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-scss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0.1
Choose a base ref
...
head repository: postcss/postcss-scss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.0.2
Choose a head ref
  • 5 commits
  • 7 files changed
  • 2 contributors

Commits on Oct 29, 2021

  1. Fix interpolated at-rule parsing (#133)

    Closes #131
    nex3 authored Oct 29, 2021
    Copy the full SHA
    c021e23 View commit details
  2. Update dependencies

    ai committed Oct 29, 2021
    Copy the full SHA
    77809e0 View commit details
  3. Add Node.js 17

    ai committed Oct 29, 2021
    Copy the full SHA
    31857d5 View commit details
  4. Update dependencies

    ai committed Oct 29, 2021
    Copy the full SHA
    81cf957 View commit details
  5. Release 4.0.2 version

    ai committed Oct 29, 2021
    Copy the full SHA
    47ff0c5 View commit details
Showing with 906 additions and 923 deletions.
  1. +11 −6 .github/workflows/test.yml
  2. +3 −0 CHANGELOG.md
  3. +17 −0 lib/scss-parser.js
  4. +19 −16 package.json
  5. +92 −67 test/parse.test.js
  6. +7 −9 test/stringify.test.js
  7. +757 −825 yarn.lock
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -2,28 +2,30 @@ name: Test
"on":
push: null
pull_request: null
env:
FORCE_COLOR: 2
jobs:
full:
name: Node.js 16 Full
name: Node.js 17 Full
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 17
cache: yarn
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn test
env:
FORCE_COLOR: 2
short:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
- 14
- 12
name: Node.js ${{ matrix.node-version }} Quick
@@ -34,7 +36,10 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: yarn install --frozen-lockfile
- name: Run unit tests
run: npx jest
env:
FORCE_COLOR: 2
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).

## 4.0.2
* Fixed at-rules with interpolated parsing (by Natalie Weizenbaum).

## 4.0.1
* Fixed source start line and column (by Ivan Nikolić).

17 changes: 17 additions & 0 deletions lib/scss-parser.js
Original file line number Diff line number Diff line change
@@ -162,6 +162,23 @@ class ScssParser extends Parser {
}
}

atrule(token) {
let name = token[1]
let prev = token
while (!this.tokenizer.endOfFile()) {
let next = this.tokenizer.nextToken()
if (next[0] === 'word' && next[2] === prev[3] + 1) {
name += next[1]
prev = next
} else {
this.tokenizer.back(next)
break
}
}

super.atrule(['at-word', name, token[2], prev[3]])
}

raw(node, prop, tokens) {
super.raw(node, prop, tokens)
if (node.raws[prop]) {
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-scss",
"version": "4.0.1",
"version": "4.0.2",
"description": "SCSS parser for PostCSS",
"keywords": [
"css",
@@ -36,24 +36,24 @@
"postcss": "^8.3.3"
},
"devDependencies": {
"@logux/eslint-config": "^45.4.8",
"clean-publish": "^3.0.3",
"eslint": "^7.32.0",
"@logux/eslint-config": "^46.0.1",
"clean-publish": "^3.4.2",
"eslint": "^8.1.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.5.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jest": "^25.2.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-let": "^1.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-prefer-let": "^3.0.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-unicorn": "^36.0.0",
"jest": "^27.2.3",
"lint-staged": "^11.1.2",
"postcss": "^8.3.8",
"postcss-parser-tests": "^8.3.6",
"postcss-sharec-config": "^0.4.1",
"eslint-plugin-unicorn": "^37.0.1",
"jest": "^27.3.1",
"lint-staged": "^11.2.6",
"postcss": "^8.3.11",
"postcss-parser-tests": "^8.3.7",
"postcss-sharec-config": "^0.5.2",
"prettier": "^2.4.1",
"simple-git-hooks": "^2.6.1"
"simple-git-hooks": "^2.7.0"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
@@ -86,8 +86,11 @@
}
}
},
"clean-publish": {
"cleanDocs": true
},
"sharec": {
"config": "postcss-sharec-config",
"version": "0.4.1"
"version": "0.5.2"
}
}
Loading