Skip to content

Bump css-tree from 1.1.3 to 3.1.0#53

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/css-tree-3.1.0
Open

Bump css-tree from 1.1.3 to 3.1.0#53
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/css-tree-3.1.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 16, 2025

Bumps css-tree from 1.1.3 to 3.1.0.

Release notes

Sourced from css-tree's releases.

3.1.0

  • Added support for boolean expression multiplier in syntax definition, i.e. <boolean-expr[ test ]> (#304)
  • Added source, startOffset, startLine, and startColumn parameters to OffsetToLocation constructor, eliminating the need to call setSource() after creating a new OffsetToLocation instance
  • Exposed OffsetToLocation class in the main entry point, which was previously accessible only via css-tree/tokenizer
  • Fixed Raw node value consumption by ignoring stop tokens inside blocks, resolving an issue where Raw value consumption stopped prematurely. This fix also enables parsing of functions whose content includes stop characters (e.g., semicolons and curly braces) within declaration values, aligning with the latest draft of CSS Values and Units L5.
  • Fixed TokenStream#balance computation to handle unmatched brackets correctly. Previously, when encountering a closing bracket, the TokenStream would prioritize it over unmatched opening brackets, leading to improper parsing. For example, the parser would incorrectly consume the declaration value of .a { prop: ([{); } as ([{) instead of consuming it until all opened brackets were closed (([{); }). Now, unmatched closing brackets are discarded unless they match the most recent opening bracket on the stack. This change aligns CSSTree with CSS specifications and browser behavior.
  • Fixed syntax definition parser to allow a token to be followed by a multiplier (#303)
  • Fixed location for Layer node (#310)
  • Bumped mdn/data to 2.12.2

3.0.1

  • Bumped mdn/data to 2.12.1
  • Added errors array to the Lexer#validate() method result, providing details on problematic syntax.
  • Added CSS wide keyword customization and introspection:
    • Added a Lexer#cssWideKeywords dictionary to list CSS-wide keywords
    • Updated the Lexer's constructor to consider config.cssWideKeywords for overriding the default list
    • Expanded the lexer's dump output to include the cssWideKeywords dictionary
    • Modified the fork() method to accept a cssWideKeywords option, allowing the addition of new keywords to the existing list
  • Reverted changes to Block to include { and }, and Atrule and Rule to exclude { and } for a block (#296)
  • Removed second parameter (assign) for the callback in the fork() method (e.g., syntax.fork((config, assign) => { ... })), as it simply refers to Object.assign()
  • Fixes in syntaxes: <basic-shapes>, <absolute-color-function> and <'stroke-opacity'>

3.0.0

  • Added support for the @container at-rule
  • Added support for the @starting-style at-rule
  • Added support for the @scope at-rule
  • Added support for the @position-try at-rule
  • Added support for the @layer at-rule
  • Added support for layer, layer() and supports() in the @media at-rule (according to the @​import rule in Cascading and Inheritance 5)
  • Added Layer and LayerList node types
  • Added TokenStream#lookupTypeNonSC() method
  • Added <dashed-ident> to generic types
  • Bumped mdn/data to 2.10.0
  • Aligned <'font'> to CSS Fonts 4
  • Aligned <color> to CSS Color 5
  • Fixed initialization when Object.prototype is extended or polluted (#262)
  • Fixed fork() method to consider the generic option when creating a Lexer instance (#266)
  • Fixed crash on parse error when custom line or offset is specified via options (#251)
  • Fixed speak syntax patch (#241)
  • Fixed :lang() to accept a list of <ident> or <string> per spec (#265)
  • Fixed lexer matching for syntaxes referred to as <'property'>, when the syntax has a top-level #-multiplier (#102)
  • Relaxed parsing of syntax definition to allow whitespaces in range multiplier (#270)
  • Changed parseWithFallback() to rollback tokenIndex before calling a fallback
  • Changed Block to not include { and }
  • Changed Atrule and Rule to include { and } for a block
  • Changed Ratio parsing:
    • Left and right parts contain nodes instead of strings
    • Both left and right parts of a ratio can now be any number; validation of number range is no longer within the parser's scope.
    • Both parts can now be functions. Although not explicitly mentioned in the specification, mathematical functions can replace numbers, addressing potential use cases (#162).
    • As per the CSS Values and Units Level 4 specification, the right part of Ratio can be omitted. While this can't be a parser output (which would produce a Number node), it's feasible during Ratio node construction or transformation.

... (truncated)

Changelog

Sourced from css-tree's changelog.

3.1.0 (December 6, 2024)

  • Added support for boolean expression multiplier in syntax definition, i.e. <boolean-expr[ test ]> (#304)
  • Added source, startOffset, startLine, and startColumn parameters to OffsetToLocation constructor, eliminating the need to call setSource() after creating a new OffsetToLocation instance
  • Exposed OffsetToLocation class in the main entry point, which was previously accessible only via css-tree/tokenizer
  • Fixed Raw node value consumption by ignoring stop tokens inside blocks, resolving an issue where Raw value consumption stopped prematurely. This fix also enables parsing of functions whose content includes stop characters (e.g., semicolons and curly braces) within declaration values, aligning with the latest draft of CSS Values and Units Module Level 5.
  • Fixed TokenStream#balance computation to handle unmatched brackets correctly. Previously, when encountering a closing bracket, the TokenStream would prioritize it over unmatched opening brackets, leading to improper parsing. For example, the parser would incorrectly consume the declaration value of .a { prop: ([{); } as ([{) instead of consuming it until all opened brackets were closed (([{); }). Now, unmatched closing brackets are discarded unless they match the most recent opening bracket on the stack. This change aligns CSSTree with CSS specifications and browser behavior.
  • Fixed syntax definition parser to allow a token to be followed by a multiplier (#303)
  • Fixed location for Layer node (#310)
  • Bumped mdn/data to 2.12.2

3.0.1 (November 1, 2024)

  • Bumped mdn/data to 2.12.1
  • Added errors array to the Lexer#validate() method result, providing details on problematic syntax.
  • Added CSS wide keyword customization and introspection:
    • Added a Lexer#cssWideKeywords dictionary to list CSS-wide keywords
    • Updated the Lexer's constructor to consider config.cssWideKeywords for overriding the default list
    • Expanded the lexer's dump output to include the cssWideKeywords dictionary
    • Modified the fork() method to accept a cssWideKeywords option, allowing the addition of new keywords to the existing list
  • Reverted changes to Block to include { and }, and Atrule and Rule to exclude { and } for a block (#296)
  • Removed second parameter (assign) for the callback in the fork() method (e.g., syntax.fork((config, assign) => { ... })), as it simply refers to Object.assign()
  • Fixes in syntaxes: <basic-shapes>, <absolute-color-function> and <'stroke-opacity'>

3.0.0 (September 11, 2024)

  • Added support for the @container at-rule
  • Added support for the @starting-style at-rule
  • Added support for the @scope at-rule
  • Added support for the @position-try at-rule
  • Added support for the @layer at-rule
  • Added support for layer, layer() and supports() in the @media at-rule (according to the @​import rule in Cascading and Inheritance 5)
  • Added Layer and LayerList node types
  • Added TokenStream#lookupTypeNonSC() method
  • Added <dashed-ident> to generic types
  • Bumped mdn/data to 2.10.0
  • Aligned <'font'> to CSS Fonts 4
  • Aligned <color> to CSS Color 5
  • Fixed initialization when Object.prototype is extended or polluted (#262)
  • Fixed fork() method to consider the generic option when creating a Lexer instance (#266)
  • Fixed crash on parse error when custom line or offset is specified via options (#251)
  • Fixed speak syntax patch (#241)
  • Fixed :lang() to accept a list of <ident> or <string> per spec (#265)
  • Fixed lexer matching for syntaxes referred to as <'property'>, when the syntax has a top-level #-multiplier (#102)
  • Relaxed parsing of syntax definition to allow whitespaces in range multiplier (#270)
  • Changed parseWithFallback() to rollback tokenIndex before calling a fallback
  • Changed Block to not include { and }
  • Changed Atrule and Rule to include { and } for a block
  • Changed Ratio parsing:
    • Left and right parts contain nodes instead of strings

... (truncated)

Commits
  • 354254f 3.1.0
  • 3e0b93b Fix TokenStream#balance computation and
  • 6b24dcc Fix npm audit warning
  • 758ccf7 Fix location of <layer-name> (#310)
  • 7cfec03 Bump esbuild to ^0.24.0
  • eab1c8e Add source, startOffset, startLine, and startColumn parameters to `Of...
  • ab29676 Expose OffsetToLocation in main entry point
  • 0afee3d Update mdn-data to v2.12.2 (#306)
  • 2c95a51 Add lexer can check at-rules syntax
  • 511bed5 Rename <boolean[]> into <boolean-expr[]> (fixes #307)
  • Additional commits viewable in compare view

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 [css-tree](https://github.com/csstree/csstree) from 1.1.3 to 3.1.0.
- [Release notes](https://github.com/csstree/csstree/releases)
- [Changelog](https://github.com/csstree/csstree/blob/master/CHANGELOG.md)
- [Commits](csstree/csstree@v1.1.3...v3.1.0)

---
updated-dependencies:
- dependency-name: css-tree
  dependency-version: 3.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 16, 2025
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.

0 participants