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

rehype-parse: bump parse5 from ^6.0.0 to ^7.0.0 #113

Closed
wants to merge 1 commit into from

Conversation

milahu
Copy link

@milahu milahu commented Oct 17, 2022

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests
  • i hate checklists

Description of changes

update parse5

we already use version 7 in hast-util-from-parse5

https://github.com/syntax-tree/hast-util-from-parse5/blob/fa0be0e589a42b1373d80f290912f6c39bf8731a/package.json#L48

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Oct 17, 2022
@github-actions

This comment has been minimized.

@milahu milahu marked this pull request as draft October 17, 2022 19:10
@milahu
Copy link
Author

milahu commented Oct 17, 2022

some more imports need fixing → draft

node test/parse-error.js

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/common/error-codes.js' is not defined by "exports" in node_modules/parse5/package.json imported from test/parse-error.js

since ESM, package authors can hide internal files ...

@bradgarropy
Copy link

Before this gets merged in, is there any workaround for this error?

Error: Package subpath './lib/parser/index.js' is not defined by "exports" in /Users/bgarropy/projects/bradgarropy.com/node_modules/parse5/package.json

@milahu
Copy link
Author

milahu commented Mar 4, 2023

ideally use public exports

- import { Parser } from "parse5/lib/parser/index.js"
+ import { Parser } from "parse5"

- import { ERR } from "parse5/lib/common/error-codes.js"
+ import { ErrorCodes } from "parse5"

workaround: use dynamic imports for private exports

@bradgarropy feel free to make a new PR

closing as abandoned

@milahu milahu closed this Mar 4, 2023
@github-actions

This comment was marked as resolved.

@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Mar 5, 2023
@github-actions

This comment was marked as resolved.

@wooorm wooorm added 👎 phase/no Post cannot or will not be acted on and removed 👋 phase/new Post is being triaged automatically labels Mar 5, 2023
@bradgarropy bradgarropy mentioned this pull request Mar 6, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

None yet

3 participants