Removed priority queue in favor of FlatQueue#1157
Conversation
…be easier to migrate to esm
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Hey how do I trigger another netlify build? Also should I be making draft PR's like this? |
|
Hello and thanks for the contribution! We have I fully support the modernization effort, but it's already in progress (see Netlify is automatically rebuilding on commit. But it looks there is a bug in your code, the class method is |
|
The reason that this lib was bugging me is that I couldn't determine where it came from. I was working with
{
"include": ["modules/**/*", "libs/**/*", "utils/**/*", "components/**/*", "config/**/*", "./*.js"],
"compilerOptions": {
"checkJs": true,
"types": ["./env.d.ts"],
"esModuleInterop": true,
"target": "ES2021",
"module": "ES2020",
}
import Rivers from "./modules/rivers.js"
namespace global {
interface Window {
Rivers: typeof Rivers
...other pretty well isolated modules
}
} To try to get some IntelliSense working. This worked on all of the utils, which were utterly unmodified, and they just got dumped into the global namespace of the editor. It was the modules wrapped in IIFEs that didn't get adequately declared. Luckily, these are some of the best isolate systems, and so knowing I was way off the rails of looking into JQuery dialog, I just sort of dove into taking it apart, thinking I would find something small to PR eventually. I was chugging along doing some ESM conversions purely as an experiment when I came to this I just wired it up with
import { default as aleaType } from '@esm-alea/prng'
interface Window {
aleaPRNG: typeof aleaType
Just sorta shoving my types on top of the existing library. This left me with only So this leads me to the only question of this novel here. Should I just replace the 5 or 6 occurrences of this priority queue with regular arrays or (PS please tell me to buzz off if I'm bugging you) Edit 1: |
|
Use |
|
sweet that makes sense! |
f3f3869 to
1203140
Compare
RyanGuild
left a comment
There was a problem hiding this comment.
This is not done. Just sitting at the pub debugging and updating.
Don't merge there's a typo in there
|
looks GTG |
|
Will do some tests and merge. Will try to complete tomorrow, please ping me if I forget :) |
| if (!cost[e] || p < cost[e]) { | ||
| cost[e] = p; | ||
| queue.queue({e, p}); | ||
| queue.push({e, p}), p; |
* removed priority queue in favor of simple array extension as it will be easier to migrate to esm * patch: bump version * spacing * moved references to globalThis * demonstrate module interop * added version to priority-queue and moved to utils to follow dom loading pattern * removed PriorityQueue in favor of FlatQueue * update index.html * never mind that force push I don't know how to amend commits right * missing capitalization * priority set to 0 on 541 --------- Co-authored-by: RyanGuild <ryan.guild@us-ignite.org>
Description
Removed the PriorityQueue lib in favor of FlatQueue for generators.
Type of change
Versioning
I am not sure how to do the file hash