Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postcss/postcss-selector-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.0.4
Choose a base ref
...
head repository: postcss/postcss-selector-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.0.6
Choose a head ref
  • 5 commits
  • 13 files changed
  • 5 contributors

Commits on Oct 12, 2020

  1. chore: update deps (#234)

    onigoetz authored Oct 12, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    96a85e3 View commit details

Commits on Apr 19, 2021

  1. pref: rework unesc for a 63+% performance boost (#239)

    * In profiling postcss I found that a significant amount of time was being
    spent in [`unesc`](https://github.com/postcss/postcss-selector-parser/commits/master/src/util/unesc.js), this was due to the expensive regex checks that were
    being performed on the fly for every selector in the codebase which looked to be performing quite poorly inside of modern node and v8.
    
    ![image](https://user-images.githubusercontent.com/883126/114136698-fdd98a80-98bf-11eb-8068-ace4f6f2274d.png)
    
    ----
    
    As an experiment and based on some prior experience with this class of slowdown I migrated the implementation to one that performs a scan through the string instead of running a regex replace. By testing this on my local application I instantly saw the work from this function go from > 900 ms to ~100ms.
    
    ![image](https://user-images.githubusercontent.com/883126/114136734-0c27a680-98c0-11eb-82ab-f0c9529fd32d.png)
    
    This implementation passes all of the existing test cases and aims to mirror the prior implementation's implementation details :)
    
    -----
    
    Based on my application I am seeing the major wins come from purgecss dropping my total application build by multiple seconds! 🔥
    
    * Expand unesc handling to correctly handle spec edgecase for lone
    surrogates and out of bound codepoint values.
    samccone authored Apr 19, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1012e3a View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    54f71ef View commit details

Commits on May 11, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c5035bc View commit details
  2. chore(release): 6.0.6

    alexander-akait committed May 11, 2021
    Copy the full SHA
    e64151e View commit details
Showing with 16,136 additions and 5,938 deletions.
  1. +1 −1 .babelrc
  2. +3 −3 .eslintrc.json
  3. +1 −5 .travis.yml
  4. +8 −0 CHANGELOG.md
  5. +15,929 −5,881 package-lock.json
  6. +22 −23 package.json
  7. +10 −3 src/__tests__/attributes.js
  8. +1 −0 src/__tests__/classes.js
  9. +1 −1 src/__tests__/util/helpers.js
  10. +62 −0 src/__tests__/util/unesc.js
  11. +18 −4 src/parser.js
  12. +1 −1 src/selectors/attribute.js
  13. +79 −16 src/util/unesc.js
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
["@babel/preset-env", { "loose": true, "useBuiltIns": "entry" }]
["@babel/preset-env", { "loose": true, "useBuiltIns": "entry", "corejs": 3 }]
],
"plugins": [
["@babel/proposal-class-properties", { "loose": true }],
6 changes: 3 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"rules": {
"babel/object-curly-spacing": 2,
"@babel/object-curly-spacing": 2,
"brace-style": [2, "1tbs", {"allowSingleLine": false}],
"camelcase": [2],
"comma-dangle": [2, "always-multiline"],
@@ -75,9 +75,9 @@
"experimentalObjectRestSpread": true
}
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"plugins": [
"babel",
"@babel",
"import"
],
"env": {
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,16 +3,12 @@ sudo: false
language: node_js
matrix:
include:
- node_js: '12'
- node_js: '11'
- node_js: '10'
- node_js: '8'
- node_js: '6'
install:
- npm install -g npm@latest
- npm ci
# https://github.com/microsoft/TypeScript/issues/40166
- |
if [ "$TRAVIS_NODE_VERSION" = '6' ]; then npm install typescript@3.9.7 ; fi
script:
- npm test
cache:
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 6.0.6

- Fixed: parse quoted attributes containing a newline correctly

# 6.0.5

- Perf: rework unesc for a 63+% performance boost

# 6.0.4

- Fixed: ts errors
Loading