Skip to content
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

Upgrade metacolon dependency #101

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Upgrade metacolon dependency #101

merged 1 commit into from
Jan 30, 2025

Conversation

FND
Copy link
Collaborator

@FND FND commented Jan 30, 2025

After the minor frenzy of #99, I believe I've figured it out after all: metacolon v2 should be good to go now.

@@ -1,5 +1,5 @@
let { repr } = require("faucet-pipeline-core/lib/util");
let colonParse = require("metacolon");
let metacolon = import("metacolon");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requireing ESM requires Node v22, so we'll have to do this little dance...

@@ -19,19 +19,21 @@ module.exports = class Page {
return Promise.resolve(this);
}

let { headers, body } = await colonParse(this.sourcePath);
let { colonParse } = await metacolon;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but apparently Node v18 doesn't do top-level await yet? I thought it should, but GitHub Actions disagreed. 🤷

@moonglum
Copy link
Member

Woha, that's a nice workaround. Thank you!

@moonglum moonglum merged commit 4e9b74f into main Jan 30, 2025
2 checks passed
@moonglum moonglum deleted the metacupgrade branch January 30, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants