Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,581 changes: 2,253 additions & 2,328 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,27 @@
],
"dependencies": {
"color-name": "^1.1.4",
"is-url-superb": "^4.0.0",
"postcss": "^7.0.5"
"is-url-superb": "^4.0.0"
},
"devDependencies": {
"ava": "^3.5.1",
"ava": "^3.12.1",
"chalk": "^4.1.0",
"eslint-config-shellscape": "^2.0.2",
"globby": "^11.0.0",
"lint-staged": "^10.0.8",
"nyc": "^15.0.0",
"eslint-config-shellscape": "^2.1.0",
"globby": "^11.0.1",
"lint-staged": "^10.4.0",
"nyc": "^15.1.0",
"perfy": "^1.1.5",
"postcss-value-parser": "^4.0.0",
"postcss": "^8.0.9",
"postcss-value-parser": "^4.1.0",
"pre-commit": "^1.2.2",
"prettier": "^2.0.1",
"prettier": "^2.1.2",
"rewiremock": "^3.14.3",
"strip-ansi": "^6.0.0",
"text-table": "^0.2.0"
},
"peerDependencies": {
"postcss": "^8.0.9"
},
"keywords": [
"css",
"less",
Expand All @@ -62,7 +66,11 @@
"ava": {
"files": [
"!**/fixtures/**",
"!**/helpers/**"
"!**/helpers/**",
"!**/rewiremock.js"
],
"require": [
"./test/rewiremock.js"
]
},
"lint-staged": {
Expand Down
12 changes: 12 additions & 0 deletions test/rewiremock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const rewiremock = require('rewiremock/node');

// Configure and enable Rewiremock
rewiremock.overrideEntryPoint(module);
rewiremock.enable();

// Override the nanoid/non-secure module to produce a predictable nonrandom ID
// This is necessary because the Input module of PostCSS uses this to generate
// Random IDs and this breaks snapshots since these are different at each run.
rewiremock('nanoid/non-secure').with({ nanoid: () => 1 });

module.exports = rewiremock;
4 changes: 4 additions & 0 deletions test/snapshots/atword.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ Generated by [AVA](https://avajs.dev).
source: {
input: Input {
css: ' @word ',
fromOffset: Function {},
hasBOM: false,
id: '<input css 1>',
},
start: {
column: 3,
line: 1,
offset: 2,
},
},
type: 'atword',
[Symbol(isComplete)]: false,
[Symbol(isClean)]: false,
},
]
Binary file modified test/snapshots/atword.test.js.snap
Binary file not shown.
Loading