-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :) |
@@ -266,7 +266,7 @@ window.Zones = (function () { | |||
|
|||
if (!cost[e] || p < cost[e]) { | |||
cost[e] = p; | |||
queue.queue({e, p}); | |||
queue.push({e, p}), p; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the only issue I see
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