postcss-prefixwrap
Advanced tools
Comparing version 1.39.1 to 1.40.0
@@ -9,16 +9,14 @@ "use strict"; | ||
constructor(prefixSelector, options = {}) { | ||
var _a, _b, _c, _d, _e; | ||
this.blacklist = (_a = options.blacklist) !== null && _a !== void 0 ? _a : []; | ||
this.ignoredSelectors = (_b = options.ignoredSelectors) !== null && _b !== void 0 ? _b : []; | ||
this.blacklist = options.blacklist ?? []; | ||
this.ignoredSelectors = options.ignoredSelectors ?? []; | ||
this.isPrefixSelector = new RegExp( | ||
// eslint-disable-next-line security-node/non-literal-reg-expr | ||
`^${prefixSelector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}$`); | ||
this.prefixRootTags = (_c = options.prefixRootTags) !== null && _c !== void 0 ? _c : false; | ||
this.prefixRootTags = options.prefixRootTags ?? false; | ||
this.prefixSelector = prefixSelector; | ||
this.whitelist = (_d = options.whitelist) !== null && _d !== void 0 ? _d : []; | ||
this.nested = (_e = options.nested) !== null && _e !== void 0 ? _e : null; | ||
this.whitelist = options.whitelist ?? []; | ||
this.nested = options.nested ?? null; | ||
} | ||
prefixRoot(css) { | ||
var _a, _b; | ||
if ((0, FileIncludeList_1.shouldIncludeFilePath)((_b = (_a = css.source) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.file, this.whitelist, this.blacklist)) { | ||
if ((0, FileIncludeList_1.shouldIncludeFilePath)(css.source?.input?.file, this.whitelist, this.blacklist)) { | ||
css.walkRules((cssRule) => { | ||
@@ -25,0 +23,0 @@ (0, CSSRuleWrapper_1.prefixWrapCSSRule)(cssRule, this.nested, this.ignoredSelectors, this.prefixSelector, this.prefixRootTags); |
@@ -7,2 +7,11 @@ # [PostCSS Prefix Wrap](./README.md) // Changelog | ||
## [1.40.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.40.0) | ||
### 🔧 Maintenance | ||
- Fix TypeScript config for updated NodeJS support. | ||
- Update use of Jest directives to definitions file. | ||
- Update import formats. | ||
- Dependency Updates | ||
## [1.39.1](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.39.1) | ||
@@ -59,3 +68,4 @@ | ||
- [#185](https://github.com/dbtedman/postcss-prefixwrap/issues/185) Don't use alias `*` selector as will break imports when used outside of config without it. | ||
- [#185](https://github.com/dbtedman/postcss-prefixwrap/issues/185) Don't use alias `*` selector as will break imports | ||
when used outside of config without it. | ||
@@ -87,3 +97,4 @@ ## [1.35.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.35.0) | ||
- [#176](https://github.com/dbtedman/postcss-prefixwrap/issues/176) Update instructions on `whitelist` and `blacklist` to clarify regular expression usage | ||
- [#176](https://github.com/dbtedman/postcss-prefixwrap/issues/176) Update instructions on `whitelist` and `blacklist` | ||
to clarify regular expression usage | ||
- Expand CI support to run on windows host to assist in identifying cross-platform issues | ||
@@ -129,3 +140,4 @@ | ||
- [[154]](https://github.com/dbtedman/postcss-prefixwrap/issues/154) Add support for nested selectors with new configuration option | ||
- [[154]](https://github.com/dbtedman/postcss-prefixwrap/issues/154) Add support for nested selectors with new | ||
configuration option | ||
@@ -136,3 +148,4 @@ ## [1.28.1](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.28.1) | ||
- [[146]](https://github.com/dbtedman/postcss-prefixwrap/issues/146) Fix Rule not wrapped when the first selector starts with the prefix | ||
- [[146]](https://github.com/dbtedman/postcss-prefixwrap/issues/146) Fix Rule not wrapped when the first selector starts | ||
with the prefix | ||
@@ -139,0 +152,0 @@ ## [1.27.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.27.0) |
@@ -11,2 +11,3 @@ # [PostCSS Prefix Wrap](./README.md) // Contributing | ||
- [Publishing](#publishing) | ||
- [References](#references) | ||
@@ -19,3 +20,4 @@ ## Core Maintainers | ||
Thanks to all of the [Contributors](https://github.com/dbtedman/postcss-prefixwrap/graphs/contributors) who maintain PostCSS Prefix Wrap and [Jeff Teng](https://github.com/aj120426394) for contributing to the initial design. | ||
Thanks to all of the [Contributors](https://github.com/dbtedman/postcss-prefixwrap/graphs/contributors) who maintain | ||
PostCSS Prefix Wrap and [Jeff Teng](https://github.com/aj120426394) for contributing to the initial design. | ||
@@ -27,3 +29,4 @@ ## Continuous Integration | ||
Provided by [GitHub Actions](https://github.com/dbtedman/postcss-prefixwrap/actions?workflow=Test), run on every commit and pull request. | ||
Provided by [GitHub Actions](https://github.com/dbtedman/postcss-prefixwrap/actions?workflow=Test), run on every commit | ||
and pull request. | ||
@@ -66,4 +69,11 @@ ## Code Formatting | ||
2. Commit these changes, and merge them into main via a pull request. | ||
3. Then [Publish a new release](https://github.com/dbtedman/postcss-prefixwrap/releases/new) to trigger publishing a new version of this package. | ||
3. Then [Publish a new release](https://github.com/dbtedman/postcss-prefixwrap/releases/new) to trigger publishing a new | ||
version of this package. | ||
4. GitHub will then trigger the **release** pipeline to publish the release to NPM. | ||
5. [Core Maintainers](#core-maintainers) will receive a notification from NPM when the package has been published. | ||
## References | ||
> 💡 Resources referenced during the development of this project. | ||
- [TypeScript: Node Target Mapping](https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping) - To correctly configure TypeScript to compile JavaScript that works with our target NodeJS versions. |
{ | ||
"name": "postcss-prefixwrap", | ||
"version": "1.39.1", | ||
"version": "1.40.0", | ||
"description": "A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.", | ||
@@ -30,26 +30,27 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "7.21.4", | ||
"@jest/globals": "29.5.0", | ||
"@types/jest": "29.5.1", | ||
"@types/node": "18.16.1", | ||
"@typescript-eslint/eslint-plugin": "5.59.1", | ||
"@typescript-eslint/parser": "5.59.1", | ||
"eslint": "8.39.0", | ||
"@babel/core": "7.22.9", | ||
"@jest/globals": "29.6.1", | ||
"@types/jest": "29.5.3", | ||
"@types/node": "20.4.2", | ||
"@typescript-eslint/eslint-plugin": "6.0.0", | ||
"@typescript-eslint/parser": "6.0.0", | ||
"eslint": "8.45.0", | ||
"eslint-config-prettier": "8.8.0", | ||
"eslint-import-resolver-typescript": "3.5.5", | ||
"eslint-plugin-import": "2.27.5", | ||
"eslint-plugin-jest": "27.2.1", | ||
"eslint-plugin-jest": "27.2.3", | ||
"eslint-plugin-promise": "6.1.1", | ||
"eslint-plugin-security-node": "1.1.1", | ||
"glob": "10.2.2", | ||
"glob": "10.3.3", | ||
"husky": "8.0.3", | ||
"jest": "29.5.0", | ||
"postcss": "8.4.23", | ||
"jest": "29.6.1", | ||
"postcss": "8.4.26", | ||
"postcss7": "npm:postcss@7.0.36", | ||
"prettier": "2.8.8", | ||
"sort-package-json": "2.4.1", | ||
"prettier": "3.0.0", | ||
"sort-package-json": "2.5.1", | ||
"source-map": "0.7.4", | ||
"source-map-js": "1.0.2", | ||
"ts-jest": "29.1.0", | ||
"ts-jest": "29.1.1", | ||
"ts-node": "10.9.1", | ||
"typescript": "5.0.4" | ||
"typescript": "5.1.6" | ||
}, | ||
@@ -60,3 +61,3 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "tsc --build tsconfig.json", | ||
"build": "tsc --build tsconfig.app.json", | ||
"clean": "node automation-clean.js", | ||
@@ -63,0 +64,0 @@ "format": "sort-package-json && prettier . --write && pnpm eslint --fix . --ext .js,.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42813
25
313