diff options
Diffstat (limited to 'node_modules/postcss-selector-not')
| -rw-r--r-- | node_modules/postcss-selector-not/CHANGELOG.md | 73 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/LICENSE | 20 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/README.md | 11 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.cjs | 2 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.d.ts | 8 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/dist/index.mjs | 2 | ||||
| -rw-r--r-- | node_modules/postcss-selector-not/package.json | 57 |
7 files changed, 49 insertions, 124 deletions
diff --git a/node_modules/postcss-selector-not/CHANGELOG.md b/node_modules/postcss-selector-not/CHANGELOG.md index 29d4f0ab..3897758f 100644 --- a/node_modules/postcss-selector-not/CHANGELOG.md +++ b/node_modules/postcss-selector-not/CHANGELOG.md @@ -1,73 +1,22 @@ # Changes to PostCSS Selector Not -### 7.0.1 (January 28, 2023) +### 7.0.2 -- Improve `types` declaration in `package.json` - -### 7.0.0 (January 24, 2023) - -- Updated: Support for Node v14+ (major). -- Fix: Do not throw when a selector is invalid, show a warning instead. - -### 6.0.1 (July 8, 2022) - -- Fixed: Case insensitive `:not` matching. - -### 6.0.0 (June 3, 2022) - -- Fixed: default export ([#409](https://github.com/csstools/postcss-plugins/issues/409)) -- Fixed: doesn't consider attribute selectors (https://github.com/postcss/postcss-selector-not/issues/23) -- Fixed: unexpected results when `:not` is not a pseudo class function (https://github.com/postcss/postcss-selector-not/issues/28) - -### 5.0.0 (January 31, 2021) - -- Added: Support for PostCSS v8. - -### 4.0.1 (December 18, 2020) - -- Fixed: error when attribute selector containing :not (https://github.com/postcss/postcss-selector-not/pull/17) - -### 4.0.0 (September 17, 2017) +_February 19, 2024_ -- Added: compatibility with postcss v7.x -- Added: compatibility with node v6.x +- Fix type definitions -### 3.0.1 (May 11, 2015) +### 7.0.1 -- Fixed: incorrect export (https://github.com/postcss/postcss-selector-not/issues/8) +_January 28, 2023_ -### 3.0.0 (May 11, 2017) - -- Added: compatibility with postcss v6.x - -### 2.0.0 (August 25, 2015) - -- Removed: compatibility with postcss v4.x -- Added: compatibility with postcss v5.x - -### 1.2.1 (June 16, 2015) - -- Fixed: selector was updated as an array, which is wrong. - -### 1.2.0 (June 16, 2015) - -- Fixed: spec has been previously misinterpreted and now transform correctly -`:not()` level 4 to collapsed level 3 -(https://github.com/postcss/postcss-selector-not/issues/1) -- Removed: `lineBreak` option (useless now) - -### 1.1.0 (June 13, 2015) - -- Added: `lineBreak` option - -### 1.0.2 (June 13, 2015) - -- Fixed: support of pseudo classes that use parenthesis +- Improve `types` declaration in `package.json` -### 1.0.1 (April 30, 2015) +### 7.0.0 -- Fixed: the module now works in non babel environments +_January 24, 2023_ -### 1.0.0 (April 30, 2015) +- Updated: Support for Node v14+ (major). +- Fix: Do not throw when a selector is invalid, show a warning instead. -✨ First release +[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not/CHANGELOG.md) diff --git a/node_modules/postcss-selector-not/LICENSE b/node_modules/postcss-selector-not/LICENSE deleted file mode 100644 index b75f6e61..00000000 --- a/node_modules/postcss-selector-not/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Maxime Thirouin - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-selector-not/README.md b/node_modules/postcss-selector-not/README.md index 415903f2..8a1d0947 100644 --- a/node_modules/postcss-selector-not/README.md +++ b/node_modules/postcss-selector-not/README.md @@ -1,6 +1,10 @@ # PostCSS Selector Not [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS] -[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-selector-not.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/not-pseudo-class.svg" height="20">][css-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord] +[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-selector-not.svg" height="20">][npm-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]<br><br>[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/not-pseudo-class.svg" height="20">][css-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/not-pseudo-class.svg" height="20">][css-url] + +```bash +npm install postcss-selector-not --save-dev +``` [PostCSS Selector Not] transforms :not() W3C CSS level 4 pseudo classes to :not() CSS level 3 selectors following the [Selectors 4 Specification]. @@ -16,8 +20,9 @@ p:not(:first-child):not(.special) { } ``` -⚠️ Only lists of simple selectors (`:not(.a, .b)`) will work as expected. -Complex selectors (`:not(.a > .b, .c ~ .d)`) can not be downgraded. +> [!CAUTION] +> Only lists of simple selectors (`:not(.a, .b)`) will work as expected. +> Complex selectors (`:not(.a > .b, .c ~ .d)`) can not be downgraded. ## Usage diff --git a/node_modules/postcss-selector-not/dist/index.cjs b/node_modules/postcss-selector-not/dist/index.cjs index c252cd99..fa5c279f 100644 --- a/node_modules/postcss-selector-not/dist/index.cjs +++ b/node_modules/postcss-selector-not/dist/index.cjs @@ -1 +1 @@ -"use strict";var e=require("postcss-selector-parser");function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e.message}"`)}}});creator.postcss=!0,module.exports=creator; +"use strict";var e=require("postcss-selector-parser");function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e instanceof Error?e.message:e}"`)}}});creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-selector-not/dist/index.d.ts b/node_modules/postcss-selector-not/dist/index.d.ts index af28b15e..9ecd7053 100644 --- a/node_modules/postcss-selector-not/dist/index.d.ts +++ b/node_modules/postcss-selector-not/dist/index.d.ts @@ -1,5 +1,9 @@ import type { PluginCreator } from 'postcss'; -/** postcss-selector-not plugin options */ -export type pluginOptions = Record<string, never>; + declare const creator: PluginCreator<pluginOptions>; export default creator; + +/** postcss-selector-not plugin options */ +export declare type pluginOptions = Record<string, never>; + +export { } diff --git a/node_modules/postcss-selector-not/dist/index.mjs b/node_modules/postcss-selector-not/dist/index.mjs index 5c2ec9cb..ffbe2ae7 100644 --- a/node_modules/postcss-selector-not/dist/index.mjs +++ b/node_modules/postcss-selector-not/dist/index.mjs @@ -1 +1 @@ -import e from"postcss-selector-parser";function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e.message}"`)}}});creator.postcss=!0;export{creator as default}; +import e from"postcss-selector-parser";function cleanupWhitespace(e){e.spaces&&(e.spaces.after="",e.spaces.before=""),e.nodes&&e.nodes.length>0&&(e.nodes[0]&&e.nodes[0].spaces&&(e.nodes[0].spaces.before=""),e.nodes[e.nodes.length-1]&&e.nodes[e.nodes.length-1].spaces&&(e.nodes[e.nodes.length-1].spaces.after=""))}const creator=()=>({postcssPlugin:"postcss-selector-not",Rule:(s,{result:o})=>{if(s.selector&&s.selector.toLowerCase().includes(":not("))try{const o=e().astSync(s.selector);o.walkPseudos((s=>{if(":not"!==s.value.toLowerCase())return;if(!s.nodes||s.nodes.length<2)return;const o=[];s.nodes.forEach((s=>{cleanupWhitespace(s);const t=e.pseudo({value:":not",nodes:[s]});o.push(t)})),s.replaceWith(...o)}));const t=o.toString();t!==s.selector&&s.replaceWith(s.clone({selector:t}))}catch(e){s.warn(o,`Failed to parse selector : "${s.selector}" with message: "${e instanceof Error?e.message:e}"`)}}});creator.postcss=!0;export{creator as default}; diff --git a/node_modules/postcss-selector-not/package.json b/node_modules/postcss-selector-not/package.json index d86d73ad..728dd077 100644 --- a/node_modules/postcss-selector-not/package.json +++ b/node_modules/postcss-selector-not/package.json @@ -1,7 +1,7 @@ { "name": "postcss-selector-not", "description": "PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to :not() CSS level 3 selectors", - "version": "7.0.1", + "version": "7.0.2", "contributors": [ { "name": "Antonio Laguna", @@ -17,49 +17,45 @@ } ], "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], "engines": { "node": "^14 || ^16 || >=18" }, + "type": "module", "main": "dist/index.cjs", "module": "dist/index.mjs", - "types": "dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.cjs", - "default": "./dist/index.mjs" + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.mjs" + }, + "require": { + "default": "./dist/index.cjs" + } } }, "files": [ "CHANGELOG.md", - "LICENSE", + "LICENSE.md", "README.md", "dist" ], "dependencies": { - "postcss-selector-parser": "^6.0.10" + "postcss-selector-parser": "^6.0.13" }, "peerDependencies": { "postcss": "^8.4" }, - "scripts": { - "prebuild": "npm run clean", - "build": "rollup -c ../../rollup/default.mjs", - "clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"", - "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", - "lint": "npm run lint:eslint && npm run lint:package-json", - "lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern", - "lint:package-json": "node ../../.github/bin/format-package-json.mjs", - "prepublishOnly": "npm run clean && npm run build && npm run test", - "test": "node .tape.mjs && npm run test:exports", - "test:exports": "node ./test/_import.mjs && node ./test/_require.cjs", - "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" - }, "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not#readme", "repository": { "type": "git", @@ -72,14 +68,5 @@ "postcss", "postcss-plugin", "selector" - ], - "csstools": { - "cssdbId": "not-pseudo-class", - "exportName": "postcssSelectorNot", - "humanReadableName": "PostCSS Selector Not", - "specUrl": "https://www.w3.org/TR/selectors-4/#negation-pseudo" - }, - "volta": { - "extends": "../../package.json" - } + ] } |
