-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[email protected] throws SyntaxError: Invalid regular expression #1937
Comments
See nodejs/node#19052:
TLDR: #1864 introduced an additional unintentional breaking change bumping the minimum Node version from 8.16.2 to 10.0.0 |
Looks like it. However if you are stuck with node v8-v9, you can run node using thr
Or as far back as v6 using:
@UziTech As we drop support for internet explorer in favor of modern JS features, it looks like we will also be conflicting with old versions of Node.js in certain cases. What's our strategy here? |
@calculuschild That's a good work around for services/utils run by their developers. Unfortunately this would also need to be communicated to all downstream clients of updated libraries which have been updated to depend on the new version of Will be interested to see the strategy going forward @UziTech why the "other package" label? |
Because the issue is in the other package. Node v8 end of life was over a year ago, so the correct solution is to update Node. Marked only supports the LTS and latest versions of Node. If the user doesn't bother updating node why would they update other dependencies? |
@UziTech That's fair enough, but the package.json says otherwise and gives the wrong impression: If we can't guarantee any particular version of Node works with any given
The user updating the marked version isn't necessarily the same user that's going to be getting that new version downstream. All the downstream user needs to do is be using node 8 and run npm install, expect nothing to break and suddenly it does. They're not even aware that marked is being used, and the maintainers of the package that use marked, don't know that their minimum node version has changed as a result of major bumping marked. |
Good point that should be removed.
Why would a downstream user be running node 8 and running |
We have listed what our semver version mean in the versioning docs. If someone wants the latest features and security they should keep their dependencies updated. Node is a dependency of their application just like any other package from npm or any other binaries they rely on. We can't always help if our update breaks due to one of their other dependencies. |
Generally a lot of the community classifies dropping support of a certain node version as a breaking (major) change to the API/package. In this case semver wasn't really an issue per say - 2.0.0 got released. The main problem is that it seems that the same problem could potentially arise in a minor or patch version in the future (i.e. making use of a node 12 feature as soon as 10 goes EOL).
They could be running npm install daily for the past 2 years. If everyone somehow managed to follow the same definition of semver perfectly then this user can keep the same environment and can be pulling daily features and fixes with a guarantee that everything will still work in an equivalent way after each update. Maybe their node version is long dead, maybe their dependencies have moved on and only support the latest version of node, but their module will still be pulling the older versions that are compatible with the environment that they started with. You guys can do things you like, but it's worth at the very least documenting specifically which node versions |
Which implies not all of the community believes that, therefor one should not just run I understand your point and we have had to create fixes for minor version updates that broke supported systems. If you would like to create a PR to update docs or package |
I am facing the same problem when using the library in react native, any solutions? |
Marked version:
2.0.0
Describe the bug
Markdown that worked previously, now errors with:
SyntaxError: Invalid regular expression: /[\p{L}\p{N}]/: Invalid escape
To Reproduce
npm install --save [email protected]
node index.js
With [email protected], this works. With [email protected], errors as above. Also, this happens on node-8. However, node-12 didn't have this issue. Possibly related to #1927.
Expected behavior
Expected previous markdown to work.
The text was updated successfully, but these errors were encountered: