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

Bump js-tokens from 4.0.0 to 9.0.1 #172

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 31, 2025

Bumps js-tokens from 4.0.0 to 9.0.1.

Changelog

Sourced from js-tokens's changelog.

Version 9.0.1 (2024-11-22)

  • Fixed: /a[/]/ is now parsed as a RegularExpressionLiteral again (regression from 8.0.3). Thanks to No Two (@​noootwo) for reporting!

Version 9.0.0 (2024-02-08)

  • Added: Support for ES2023: #! hashbang comments at the start of files.

Version 8.0.3 (2024-02-03)

  • Fixed: Extremely long string literals, template literals, regex literals, identifiers, comments, and runs of whitespace are now supported where possible. We’re talking about 10 million characters long. Previously, such long tokens could make the regex engine of the runtime give up and throw a Maximum call stack size exceeded or similar error. There are still a few [even more extreme such edge cases][known-failures], which I don’t think can be solved but are documented at least.

Version 8.0.2 (2023-09-09)

  • Fixed: The TypeScript type definitions shipped in the npm package are now more correct. Previously they used export default, but apparently export = is the correct syntax to use for packages that export a single function, which can be used both in CJS and MJS. (Read more about [Incorrect default export]). It should now be possible to do const jsTokens = require("js-tokens") in a @ts-checkeded JS file without TypeScript complaining. Note: This requires "esModuleInterop": true in your tsconfig.json, but as far as I can tell that’s not a breaking change, since importing js-tokens with "esModuleInterop": false didn’t work at runtime anyway.

Version 8.0.1 (2023-01-16)

  • Fixed: /]/ is now parsed as a RegularExpressionLiteral. That’s invalid regex syntax, unless [Annex B: Additional ECMAScript Features for Web Browsers][annexb] is honored, which js-tokens does. Thanks to Jared Hughes (@​jared-hughes) for reporting and fixing!

Version 8.0.0 (2022-05-15)

Support for ES2022!

  • Added: Support for the d regex flag.

  • Added: A new token type – PrivateIdentifier – for things like #name.

    this.#name now tokenizes differently:

    • Before: IdentifierName: this, Punctuator: ., Invalid: #, IdentifierName: name
    • After: IdentifierName: this, Punctuator: ., PrivateIdentifier: #name

Version 7.0.0 (2021-04-25)

  • Added: Support for ES2021: The ||=, &&= and ??= operators, as well as underscores in numeric literals (1_000).

Version 6.0.0 (2020-04-13)

  • Changed: The main export of this module is no longer a regex (accompanied by a small helper function). Instead, the only export is a function that tokenizes JavaScript (which was the main use case of the regex). The tokenization is still powered by basically the same regex as before, but is now wrapped up in 300–400 lines of code. This is required to tokenize regex and templates correctly, and to support JSX (see below).
  • Changed: You no longer need .default when using CommonJS: const jsTokens = require("js-tokens"). (import jsTokens from "js-tokens" also works in module environments.)
  • Changed: Node.js 10 or later is now required (because [Unicode property escapes] are used.)
  • Changed: The tokens are now named like in the ECMAScript spec.
  • Changed: Whitespace and line terminator sequences are now matched as separate tokens to match the spec.
  • Added: TypeScript definition.
  • Added: Support for JSX: jsTokens("<p>Hello, world!</p>", { jsx: true }).
  • Added: Support for BigInt syntax: 5n.
  • Added: Support for ?. and ??.
  • Added: Support for legacy octal and octal like numeric literals.
  • Improved: Template literals now support infinite nesting, and separate tokens are made for interpolations.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [js-tokens](https://github.com/lydell/js-tokens) from 4.0.0 to 9.0.1.
- [Changelog](https://github.com/lydell/js-tokens/blob/main/CHANGELOG.md)
- [Commits](lydell/js-tokens@v4.0.0...v9.0.1)

---
updated-dependencies:
- dependency-name: js-tokens
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from RalphHightower as a code owner January 31, 2025 09:50
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jan 31, 2025
@RalphHightower RalphHightower self-assigned this Jan 31, 2025
Copy link
Owner

@RalphHightower RalphHightower left a comment

Choose a reason for hiding this comment

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

Approved

@RalphHightower RalphHightower merged commit d9bf4a6 into main Jan 31, 2025
2 of 6 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/js-tokens-9.0.1 branch January 31, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant