From 55f744899ce058850a5dd40074aede3bca5baa3d Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Fri, 17 Jan 2025 18:06:49 -0500 Subject: [PATCH 01/13] feat: add support for container scroll-state * Add support for CSS container query scroll-state. --- packages/less/src/less/functions/index.js | 2 ++ .../less/src/less/functions/scroll-state.js | 23 +++++++++++++++++++ packages/test-data/css/_main/container.css | 19 +++++++++++++++ packages/test-data/less/_main/container.less | 23 +++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 packages/less/src/less/functions/scroll-state.js diff --git a/packages/less/src/less/functions/index.js b/packages/less/src/less/functions/index.js index 160ac7523..51fa81f53 100644 --- a/packages/less/src/less/functions/index.js +++ b/packages/less/src/less/functions/index.js @@ -13,6 +13,7 @@ import string from './string'; import svg from './svg'; import types from './types'; import style from './style'; +import scrollState from './scroll-state'; export default environment => { const functions = { functionRegistry, functionCaller }; @@ -30,6 +31,7 @@ export default environment => { functionRegistry.addMultiple(svg(environment)); functionRegistry.addMultiple(types); functionRegistry.addMultiple(style); + functionRegistry.addMultiple(scrollState); return functions; }; diff --git a/packages/less/src/less/functions/scroll-state.js b/packages/less/src/less/functions/scroll-state.js new file mode 100644 index 000000000..fea922da4 --- /dev/null +++ b/packages/less/src/less/functions/scroll-state.js @@ -0,0 +1,23 @@ +import Variable from '../tree/variable'; +import Anonymous from '../tree/variable'; + +const scrollStateExpression = function (args) { + args = Array.prototype.slice.call(args); + switch (args.length) { + case 0: throw { type: 'Argument', message: 'one or more arguments required' }; + } + + const entityList = [new Variable(args[0].value, this.index, this.currentFileInfo).eval(this.context)]; + + args = entityList.map(a => { return a.toCSS(this.context); }).join(this.context.compress ? ',' : ', '); + + return new Anonymous(`scroll-state(${args})`); +}; + +export default { + 'scroll-state': function(...args) { + try { + return scrollStateExpression.call(this, args); + } catch (e) {} + }, +}; diff --git a/packages/test-data/css/_main/container.css b/packages/test-data/css/_main/container.css index f5a17a602..c710e5f43 100644 --- a/packages/test-data/css/_main/container.css +++ b/packages/test-data/css/_main/container.css @@ -241,3 +241,22 @@ color: purple; } } +#sticky { + position: sticky; + container-type: scroll-state; +} +@container scroll-state (stuck: top) { + #sticky-child { + font-size: 75%; + } +} +@container scroll-state (snapped: x) { + #sticky-child { + font-size: 75%; + } +} +@container scroll-state (scrollable: top) { + #sticky-child { + font-size: 75%; + } +} diff --git a/packages/test-data/less/_main/container.less b/packages/test-data/less/_main/container.less index 73fd17be0..cb02b49e0 100644 --- a/packages/test-data/less/_main/container.less +++ b/packages/test-data/less/_main/container.less @@ -289,3 +289,26 @@ color: purple; } } + +#sticky { + position: sticky; + container-type: scroll-state; +} + +@container scroll-state(stuck: top) { + #sticky-child { + font-size: 75%; + } +} + +@container scroll-state(snapped: x) { + #sticky-child { + font-size: 75%; + } +} + +@container scroll-state(scrollable: top) { + #sticky-child { + font-size: 75%; + } +} From 6c1f2f3b3b2d44e48d092248dcc35968377e042a Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Fri, 31 Jan 2025 18:30:21 -0500 Subject: [PATCH 02/13] fix: issue #4313 selector with comma * Fix an issue where selector with comma would not expand correctly. --- packages/less/src/less/tree/ruleset.js | 22 +++++++++++++++++++- packages/test-data/css/_main/selectors.css | 12 +++++++++++ packages/test-data/less/_main/selectors.less | 20 ++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/packages/less/src/less/tree/ruleset.js b/packages/less/src/less/tree/ruleset.js index a3324cf07..fbe6e8f8c 100644 --- a/packages/less/src/less/tree/ruleset.js +++ b/packages/less/src/less/tree/ruleset.js @@ -748,12 +748,32 @@ Ruleset.prototype = Object.assign(new Node(), { const replacementSelector = createSelector(createParenthesis(nestedPaths[k], el), el); addAllReplacementsIntoPath(newSelectors, [replacementSelector], el, inSelector, replacedNewSelectors); } + newSelectors = replacedNewSelectors; + currentElements = []; + } else if (el instanceof Selector) { + const nestedSelector = el; + + // merge the current list of non parent selector elements + // on to the current list of selectors to add + mergeElementsOnToSelectors(currentElements, newSelectors); + + const nestedPaths = []; + let replaced; + let replacedNewSelectors = []; + replaced = replaceParentSelector(nestedPaths, context, nestedSelector); + hadParentSelector = hadParentSelector || replaced; + + for (k = 0; k < nestedPaths.length; k++) { + const replacementSelector = nestedPaths[k][0]; + addAllReplacementsIntoPath(newSelectors, [replacementSelector], el.elements[0], inSelector, replacedNewSelectors); + replacedNewSelectors = [replacedNewSelectors[0]] + } + newSelectors = replacedNewSelectors; currentElements = []; } else { currentElements.push(el); } - } else { hadParentSelector = true; // the new list of selectors to add diff --git a/packages/test-data/css/_main/selectors.css b/packages/test-data/css/_main/selectors.css index 92c8b824f..ccf216189 100644 --- a/packages/test-data/css/_main/selectors.css +++ b/packages/test-data/css/_main/selectors.css @@ -189,3 +189,15 @@ a:is(.b, :is(.c)) { a:is(.b, :is(.c), :has(div)) { color: red; } +.multiple-not-by-comma:not(.multiple-not-by-comma--a, .multiple-not-by-comma--b):not(.multiple-not-by-comma--c, .multiple-not-by-comma--d):hover { + background-color: green; +} +.multiple-not-by-comma2 { + color: red; +} +.multiple-not-by-comma2:not(.multiple-not-by-comma2--a, .multiple-not-by-comma2--b):not(.multiple-not-by-comma2--c):hover { + background-color: blue; +} +.multiple-not:not(.multiple-not--a):not(.multiple-not--b):hover { + background-color: yellow; +} diff --git a/packages/test-data/less/_main/selectors.less b/packages/test-data/less/_main/selectors.less index c976380a8..c767b3b31 100644 --- a/packages/test-data/less/_main/selectors.less +++ b/packages/test-data/less/_main/selectors.less @@ -208,3 +208,23 @@ a:is(.b, :is(.c)) { a:is(.b, :is(.c), :has(div)) { color: red; } + +.multiple-not-by-comma { + &:not(&--a, &--b):not(&--c, &--d):hover { + background-color: green; + } +} + +.multiple-not-by-comma2 { + color: red; + + &:not(&--a, &--b):not(&--c):hover { + background-color: blue; + } +} + +.multiple-not { + &:not(&--a):not(&--b):hover { + background-color: yellow; + } +} From ab0e64f202190025afd6349a4f94fcc3451a7c75 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 10:23:08 -0500 Subject: [PATCH 03/13] fix: issue #4313 make solution more flexible * Make fix for issue #4313 selector list not expanding correctly more flexible. --- packages/less/src/less/tree/ruleset.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/less/src/less/tree/ruleset.js b/packages/less/src/less/tree/ruleset.js index fbe6e8f8c..1a69ce6e0 100644 --- a/packages/less/src/less/tree/ruleset.js +++ b/packages/less/src/less/tree/ruleset.js @@ -760,13 +760,18 @@ Ruleset.prototype = Object.assign(new Node(), { const nestedPaths = []; let replaced; let replacedNewSelectors = []; + let currentReplacedSelectors = []; replaced = replaceParentSelector(nestedPaths, context, nestedSelector); hadParentSelector = hadParentSelector || replaced; for (k = 0; k < nestedPaths.length; k++) { - const replacementSelector = nestedPaths[k][0]; - addAllReplacementsIntoPath(newSelectors, [replacementSelector], el.elements[0], inSelector, replacedNewSelectors); - replacedNewSelectors = [replacedNewSelectors[0]] + for (let selectorIndex = 0; selectorIndex < nestedPaths[k].length; ++selectorIndex) { + const replacementSelector = nestedPaths[k][selectorIndex]; + addAllReplacementsIntoPath(newSelectors, [replacementSelector], el.elements[0], inSelector, replacedNewSelectors); + for (let current = 0; current < currentReplacedSelectors.length; ++current) { + replacedNewSelectors.push(currentReplacedSelectors[current]); + } + } } newSelectors = replacedNewSelectors; From 8a71e56cd2cccfa09ffa548caf61b66d4500dffe Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 10:29:44 -0500 Subject: [PATCH 04/13] fix: issue #4313 add more tests * Add more tests for fix for issue #4313. --- packages/test-data/css/_main/selectors.css | 9 +++++++++ packages/test-data/less/_main/selectors.less | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/test-data/css/_main/selectors.css b/packages/test-data/css/_main/selectors.css index ccf216189..4bdddd191 100644 --- a/packages/test-data/css/_main/selectors.css +++ b/packages/test-data/css/_main/selectors.css @@ -201,3 +201,12 @@ a:is(.b, :is(.c), :has(div)) { .multiple-not:not(.multiple-not--a):not(.multiple-not--b):hover { background-color: yellow; } +.multiple-not-by-comma3 { + color: #ffdde3; +} +.multiple-not-by-comma3:not(.multiple-not-by-comma3--a, .multiple-not-by-comma3--b):not(.multiple-not-by-comma3--c):hover { + background-color: #ffed54; +} +.multiple-not-by-comma3:is(.multiple-not-by-comma3--g, .multiple-not-by-comma3--h) { + color: #eeff55; +} diff --git a/packages/test-data/less/_main/selectors.less b/packages/test-data/less/_main/selectors.less index c767b3b31..1a3d7f81d 100644 --- a/packages/test-data/less/_main/selectors.less +++ b/packages/test-data/less/_main/selectors.less @@ -228,3 +228,15 @@ a:is(.b, :is(.c), :has(div)) { background-color: yellow; } } + +.multiple-not-by-comma3 { + color: #ffdde3; + + &:not(&--a, &--b):not(&--c):hover { + background-color: #ffed54; + } + + &:is(&--g, &--h) { + color: #eeff55; + } +} From 75e212c2da519a5e7acbc6044f7b82366f1b62ab Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 10:49:40 -0500 Subject: [PATCH 05/13] fix: issue #4313 cleanup merge issues * Cleanup merge issues for fix for issue #4313. --- packages/less/src/less/functions/index.js | 2 -- .../less/src/less/functions/scroll-state.js | 23 ------------------- packages/test-data/css/_main/container.css | 19 --------------- packages/test-data/less/_main/container.less | 23 ------------------- 4 files changed, 67 deletions(-) delete mode 100644 packages/less/src/less/functions/scroll-state.js diff --git a/packages/less/src/less/functions/index.js b/packages/less/src/less/functions/index.js index 51fa81f53..160ac7523 100644 --- a/packages/less/src/less/functions/index.js +++ b/packages/less/src/less/functions/index.js @@ -13,7 +13,6 @@ import string from './string'; import svg from './svg'; import types from './types'; import style from './style'; -import scrollState from './scroll-state'; export default environment => { const functions = { functionRegistry, functionCaller }; @@ -31,7 +30,6 @@ export default environment => { functionRegistry.addMultiple(svg(environment)); functionRegistry.addMultiple(types); functionRegistry.addMultiple(style); - functionRegistry.addMultiple(scrollState); return functions; }; diff --git a/packages/less/src/less/functions/scroll-state.js b/packages/less/src/less/functions/scroll-state.js deleted file mode 100644 index fea922da4..000000000 --- a/packages/less/src/less/functions/scroll-state.js +++ /dev/null @@ -1,23 +0,0 @@ -import Variable from '../tree/variable'; -import Anonymous from '../tree/variable'; - -const scrollStateExpression = function (args) { - args = Array.prototype.slice.call(args); - switch (args.length) { - case 0: throw { type: 'Argument', message: 'one or more arguments required' }; - } - - const entityList = [new Variable(args[0].value, this.index, this.currentFileInfo).eval(this.context)]; - - args = entityList.map(a => { return a.toCSS(this.context); }).join(this.context.compress ? ',' : ', '); - - return new Anonymous(`scroll-state(${args})`); -}; - -export default { - 'scroll-state': function(...args) { - try { - return scrollStateExpression.call(this, args); - } catch (e) {} - }, -}; diff --git a/packages/test-data/css/_main/container.css b/packages/test-data/css/_main/container.css index c710e5f43..f5a17a602 100644 --- a/packages/test-data/css/_main/container.css +++ b/packages/test-data/css/_main/container.css @@ -241,22 +241,3 @@ color: purple; } } -#sticky { - position: sticky; - container-type: scroll-state; -} -@container scroll-state (stuck: top) { - #sticky-child { - font-size: 75%; - } -} -@container scroll-state (snapped: x) { - #sticky-child { - font-size: 75%; - } -} -@container scroll-state (scrollable: top) { - #sticky-child { - font-size: 75%; - } -} diff --git a/packages/test-data/less/_main/container.less b/packages/test-data/less/_main/container.less index cb02b49e0..73fd17be0 100644 --- a/packages/test-data/less/_main/container.less +++ b/packages/test-data/less/_main/container.less @@ -289,26 +289,3 @@ color: purple; } } - -#sticky { - position: sticky; - container-type: scroll-state; -} - -@container scroll-state(stuck: top) { - #sticky-child { - font-size: 75%; - } -} - -@container scroll-state(snapped: x) { - #sticky-child { - font-size: 75%; - } -} - -@container scroll-state(scrollable: top) { - #sticky-child { - font-size: 75%; - } -} From 47685610ca5ecfadb590bd4d1639b6558e0e6067 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 16:31:21 -0500 Subject: [PATCH 06/13] fix: revise CI for missing browser issue * Revise CI for missing browser issue. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3b39ba72..8c397387c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: run: npm install - name: Print put node & npm version run: node --version && npm --version - - name: Install chromium - run: npx playwright install chromium + - name: Install browsers + run: npx playwright install - name: Run unit test run: npm run test From d137778600ec963ab4fabb9efa6002b4bba1cef8 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 16:43:47 -0500 Subject: [PATCH 07/13] fix: trying to resolve CI issues * Trying to resolve CI issues with Playwright. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c397387c..215f5fbd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,9 @@ jobs: basic_node_test: name: 'Basic tests on ubuntu-latest with nodejs v22 (current LTS version)' runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/less steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 From 0111faf49c3485b9c0f70c9e6f15801600decb56 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 16:46:01 -0500 Subject: [PATCH 08/13] fix: trying to resolve CI issues * Trying to resolve CI issues with Playwright. --- .github/workflows/ci.yml | 3 --- package.json | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 215f5fbd6..8c397387c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,6 @@ jobs: basic_node_test: name: 'Basic tests on ubuntu-latest with nodejs v22 (current LTS version)' runs-on: ubuntu-latest - defaults: - run: - working-directory: packages/less steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/package.json b/package.json index 917488dcb..ba51e746e 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "devDependencies": { "github-changes": "^1.1.2", "lerna": "^3.22.1", - "npm-run-all": "^4.1.5" + "npm-run-all": "^4.1.5", + "playwright": "^1.49.0" } } From f5ac00390d5648c1e86d108bb6ddb0a44031b521 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 16:50:38 -0500 Subject: [PATCH 09/13] fix: trying to resolve CI issues * Trying to resolve CI issues with Playwright. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c397387c..e7fb2a54a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install browsers - run: npx playwright install + run: npx playwright@1.49.0 install - name: Run unit test run: npm run test From 2f69d301dd17d91459dfd1a9a4198c8b73cd596a Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 1 Feb 2025 16:53:27 -0500 Subject: [PATCH 10/13] fix: fix CI by pinning Playwright version * Fix CI by pinning CI version to resolve incorrect browser binary downloads. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7fb2a54a..2ec3296b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: run: npm install - name: Print put node & npm version run: node --version && npm --version - - name: Install browsers - run: npx playwright@1.49.0 install + - name: Install chromium + run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -49,7 +49,7 @@ jobs: # Output useful info for debugging. run: node --version && npm --version - name: Install chromium - run: npx playwright install chromium + run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -71,7 +71,7 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install chromium - run: npx playwright install chromium + run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -89,6 +89,6 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install chromium - run: npx playwright install chromium + run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test From 9e65c09d65f6f5f8a00d4121fbe9f772d42ad69d Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Sat, 15 Feb 2025 06:44:18 -0500 Subject: [PATCH 11/13] fix: imrpove CI stability and add comments * Improve CI stability by only grabbing patch updates. This may when npm install runs we will not download a version of Playwright which will be incompatible with the browser binaries installed by CI. * Add CI code comments about the Playwright issue that we ran into. --- .github/workflows/ci.yml | 4 ++ package-lock.json | 73 ++++++++++++++++++++++++++++++++- package.json | 2 +- packages/less/package-lock.json | 2 +- packages/less/package.json | 2 +- 5 files changed, 79 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ec3296b6..46a13bcfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install chromium + # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -49,6 +50,7 @@ jobs: # Output useful info for debugging. run: node --version && npm --version - name: Install chromium + # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -71,6 +73,7 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install chromium + # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test @@ -89,6 +92,7 @@ jobs: - name: Print put node & npm version run: node --version && npm --version - name: Install chromium + # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases run: npx playwright@1.49.0 install chromium - name: Run unit test run: npm run test diff --git a/package-lock.json b/package-lock.json index 2124677fa..998297f7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "devDependencies": { "github-changes": "^1.1.2", "lerna": "^3.22.1", - "npm-run-all": "^4.1.5" + "npm-run-all": "^4.1.5", + "playwright": "~1.49.0" } }, "node_modules/@babel/code-frame": { @@ -4661,6 +4662,21 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "dev": true, @@ -8556,6 +8572,38 @@ "node": ">=0.10.0" } }, + "node_modules/playwright": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", + "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.49.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", + "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -14850,6 +14898,13 @@ "version": "1.0.0", "dev": true }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "dev": true @@ -17814,6 +17869,22 @@ "pinkie": "^2.0.0" } }, + "playwright": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", + "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "dev": true, + "requires": { + "fsevents": "2.3.2", + "playwright-core": "1.49.1" + } + }, + "playwright-core": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", + "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "dev": true + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", diff --git a/package.json b/package.json index ba51e746e..c47c5968a 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "github-changes": "^1.1.2", "lerna": "^3.22.1", "npm-run-all": "^4.1.5", - "playwright": "^1.49.0" + "playwright": "~1.49.0" } } diff --git a/packages/less/package-lock.json b/packages/less/package-lock.json index 38b084abd..dd84913d2 100644 --- a/packages/less/package-lock.json +++ b/packages/less/package-lock.json @@ -49,7 +49,7 @@ "npm-run-all": "^4.1.5", "performance-now": "^0.2.0", "phin": "^2.2.3", - "playwright": "^1.49.0", + "playwright": "~1.49.0", "promise": "^7.1.1", "read-glob": "^3.0.0", "resolve": "^1.17.0", diff --git a/packages/less/package.json b/packages/less/package.json index 7d4785eac..79bf24660 100644 --- a/packages/less/package.json +++ b/packages/less/package.json @@ -85,7 +85,7 @@ "less-plugin-clean-css": "^1.6.0", "minimist": "^1.2.0", "mocha": "^6.2.1", - "playwright": "^1.49.0", + "playwright": "~1.49.0", "mocha-teamcity-reporter": "^3.0.0", "nock": "^11.8.2", "npm-run-all": "^4.1.5", From 97770e41bf7a122b6513a918c3150f63ceb9f19f Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Mon, 3 Mar 2025 16:14:15 -0500 Subject: [PATCH 12/13] chore: remove package.json changes * Remove package.json changes per master branch updates. --- package.json | 3 +-- packages/less/package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c47c5968a..917488dcb 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "devDependencies": { "github-changes": "^1.1.2", "lerna": "^3.22.1", - "npm-run-all": "^4.1.5", - "playwright": "~1.49.0" + "npm-run-all": "^4.1.5" } } diff --git a/packages/less/package.json b/packages/less/package.json index 79bf24660..7d4785eac 100644 --- a/packages/less/package.json +++ b/packages/less/package.json @@ -85,7 +85,7 @@ "less-plugin-clean-css": "^1.6.0", "minimist": "^1.2.0", "mocha": "^6.2.1", - "playwright": "~1.49.0", + "playwright": "^1.49.0", "mocha-teamcity-reporter": "^3.0.0", "nock": "^11.8.2", "npm-run-all": "^4.1.5", From 4449a866cd271c2d89969f0d54fc93002a83e6a5 Mon Sep 17 00:00:00 2001 From: Daniel Puckowski Date: Mon, 3 Mar 2025 16:18:53 -0500 Subject: [PATCH 13/13] chore: cleanup CI changes * Cleanup CI changes per master branch updates to CI. --- .github/workflows/ci.yml | 83 ---------------------------------------- 1 file changed, 83 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b54fe0017..eaac3e7fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,53 +9,6 @@ on: branches: [main, master] jobs: -<<<<<<< HEAD - basic_node_test: - name: 'Basic tests on ubuntu-latest with nodejs v22 (current LTS version)' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Install npm dependencies - run: npm install - - name: Print put node & npm version - run: node --version && npm --version - - name: Install chromium - # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases - run: npx playwright@1.49.0 install chromium - - name: Run unit test - run: npm run test - - windows_and_macos_test: - name: 'Platform tests on ${{matrix.os}} with nodejs v${{matrix.node}}' - needs: basic_node_test - strategy: - matrix: - # Test all mainstream operating system - os: [macos-latest, windows-latest] - node: [22] - runs-on: ${{ matrix.os }} - steps: - # Pull repo to test machine - - uses: actions/checkout@v2 - # Configures the node version used on GitHub-hosted runners - - uses: actions/setup-node@v2 - with: - # The Node.js version to configure - node-version: ${{ matrix.node }} - - name: Install npm dependencies - run: npm install - - name: Print put node & npm version - # Output useful info for debugging. - run: node --version && npm --version - - name: Install chromium - # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases - run: npx playwright@1.49.0 install chromium - - name: Run unit test - run: npm run test -======= test: name: 'Tests on ${{matrix.os}} with Node "${{matrix.node}}"' strategy: @@ -72,45 +25,10 @@ jobs: node: 'lts/-2' - os: ubuntu-latest node: 'lts/-3' ->>>>>>> master runs-on: ${{ matrix.os }} # This has copy/paste steps and should be refactored using DRY steps: -<<<<<<< HEAD - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Install npm dependencies - run: npm install - - name: Print put node & npm version - run: node --version && npm --version - - name: Install chromium - # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases - run: npx playwright@1.49.0 install chromium - - name: Run unit test - run: npm run test - - latest_nodejs_testing_node23: - name: 'Latest nodejs v23 test' - needs: basic_node_test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 23 - - name: Install npm dependencies - run: npm install - - name: Print put node & npm version - run: node --version && npm --version - - name: Install chromium - # package.json specifies 1.49.X; we need to align to ensure the correct browser binaries are installed as playwright may push new releases - run: npx playwright@1.49.0 install chromium - - name: Run unit test - run: npm run test -======= - uses: actions/checkout@v4 - name: Install pnpm uses: pnpm/action-setup@v4 @@ -128,4 +46,3 @@ jobs: run: npx playwright install chromium - name: Run unit test run: pnpm run test ->>>>>>> master