New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-prefixwrap

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-prefixwrap - npm Package Compare versions

Comparing version 1.22.2 to 1.23.0

build/index.d.ts

96

CHANGELOG.md
# [PostCSS Prefix Wrap](./README.md) // Changelog
Releases ordered so that the most recent are displayed at the top, with the currently being developed release at the top, labeled as **In Development**. This release will be given a number once it is ready to be released. Each release can contain both a **Features and Improvements** and **Bug Fixes** sections.
Releases ordered so that the most recent are displayed at the top, with the currently being developed release at the top, labeled as **🚧 In Development**. This release will be given a number once it is ready to be released. Each release can contain both a **💡 Features and Improvements**, **🔧 Maintenance**, and **🐛 Bug Fixes** sections.
## [1.23.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.23.0)
### 💡 Features and Improvements
- Define supported NodeJS versions, and tweak TypeScript build accordingly.
### 🔧 Maintenance
- Dependency Updates
## [1.22.2](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.22.2)
### 🔧 Maintenance
- Dependency updates

@@ -11,3 +23,3 @@

### Bug Fixes
### 🐛 Bug Fixes

@@ -18,3 +30,3 @@ - Remove explicit version

### Features and Improvements
### 💡 Features and Improvements

@@ -25,3 +37,3 @@ - [#116](https://github.com/dbtedman/postcss-prefixwrap/issues/116) Expand postcss version support allowed with peer

### Features and Improvements
### 🔧 Maintenance

@@ -33,3 +45,3 @@ - Dependency Updates

### Features and Improvements
### 🔧 Maintenance

@@ -40,3 +52,3 @@ - Dependency updates

### Features and Improvements
### 💡 Features and Improvements

@@ -47,3 +59,3 @@ - [[109]](https://github.com/dbtedman/postcss-prefixwrap/pull/109) Fix compatibility with PostCSS 8.1

### Bug Fixes
### 🐛 Bug Fixes

@@ -54,3 +66,3 @@ - [[107]](https://github.com/dbtedman/postcss-prefixwrap/pull/107) Fix relative path issue `Cannot find module 'PostCSSPrefixWrap'`

### Features and Improvements
### 💡 Features and Improvements

@@ -61,3 +73,3 @@ - [[104]](https://github.com/dbtedman/postcss-prefixwrap/issues/104) PostCSS 8 Support

### Features and Improvements
### 🔧 Maintenance

@@ -69,3 +81,3 @@ - Dependency updates

### Features and Improvements
### 🔧 Maintenance

@@ -76,3 +88,3 @@ - Dependency updates

### Features and Improvements
### 💡 Features and Improvements

@@ -83,7 +95,7 @@ - [[91]](https://github.com/dbtedman/postcss-prefixwrap/pull/91) Clarify prefixRootTags option

### Features and Improvements
### 💡 Features and Improvements
- [ESLint](https://eslint.org/) support to improve code quality
### Bug Fixes
### 🔧 Maintenance

@@ -94,3 +106,3 @@ - Dependency updates

### Bug Fixes
### 🔧 Maintenance

@@ -101,3 +113,3 @@ - Dependency updates

### Bug Fixes
### 🔧 Maintenance

@@ -108,3 +120,3 @@ - Dependency updates

### Features and Improvements
### 💡 Features and Improvements

@@ -119,3 +131,3 @@ - Implement `blacklist`

### Features and Improvements
### 💡 Features and Improvements

@@ -126,3 +138,3 @@ - GitHub Actions Release

### Features and Improvements
### 💡 Features and Improvements

@@ -133,7 +145,7 @@ - GitHub Actions (Replacing TravisCI)

### Features and Improvements
### 💡 Features and Improvements
- Add integration tests to validate plugin defined correctly in build.
### Bug Fixes
### 🐛 Bug Fixes

@@ -144,3 +156,3 @@ - Fix error in main file definition.

### Features and Improvements
### 💡 Features and Improvements

@@ -151,3 +163,3 @@ - Jest

### Features and Improvements
### 💡 Features and Improvements

@@ -158,3 +170,3 @@ - Audit Fixes

### Features and Improvements
### 💡 Features and Improvements

@@ -166,3 +178,3 @@ - Refactored test implementation with `acceptance`, and `unit` kinds.

### Bug Fixes
### 🐛 Bug Fixes

@@ -174,3 +186,3 @@ - Updated package metadata.

### Features and Improvements
### 💡 Features and Improvements

@@ -183,3 +195,3 @@ - [[41]](https://github.com/dbtedman/postcss-prefixwrap/pull/41) Added ignored selectors list.

### Bug Fixes
### 🐛 Bug Fixes

@@ -190,3 +202,3 @@ - Dependency and License updates.

### Features and Improvements
### 💡 Features and Improvements

@@ -201,7 +213,7 @@ - [[28]](https://github.com/dbtedman/postcss-prefixwrap/issues/28) PostCSS Should be a Peer Dependency not Dependency

### Features and Improvements
### 💡 Features and Improvements
- [[22]](https://github.com/dbtedman/postcss-prefixwrap/pull/22) Implement a more robust `@keyframes` detection, preserving `from` and `to` inside `@keyframes`
### Bug Fixes
### 🐛 Bug Fixes

@@ -212,3 +224,3 @@ - [[23]](https://github.com/dbtedman/postcss-prefixwrap/pull/23) Stop ESLint from searching for config files in parent folders

### Features and Improvements
### 💡 Features and Improvements

@@ -219,3 +231,3 @@ - Add code coverage reporting to ensure all parts of the code are being exercised by the tests

### Bug Fixes
### 🐛 Bug Fixes

@@ -226,3 +238,3 @@ - [[17]](https://github.com/dbtedman/postcss-prefixwrap/issues/17) Keyframe percentages are incorrectly prefixed

### Bug Fixes
### 🐛 Bug Fixes

@@ -233,3 +245,3 @@ - [[6]](https://github.com/dbtedman/postcss-prefixwrap/issues/6) Selectors containing the word "body" or "html" treated as root

### Bug Fixes
### 🐛 Bug Fixes

@@ -240,3 +252,3 @@ - Support for multiline selectors

### Features and Improvements
### 💡 Features and Improvements

@@ -248,3 +260,3 @@ - Updates to support disabling of html/body replacement

### Features and Improvements
### 💡 Features and Improvements

@@ -255,3 +267,3 @@ - Updates to README contents

### Features and Improvements
### 💡 Features and Improvements

@@ -262,3 +274,3 @@ - Updated npm dependencies to explicitly define versions

### Features and Improvements
### 💡 Features and Improvements

@@ -270,3 +282,3 @@ - Expanded ESLint coverage to validate test scripts

### Features and Improvements
### 💡 Features and Improvements

@@ -277,3 +289,3 @@ - Added test for our container selector matching existing selector

### Features and Improvements
### 💡 Features and Improvements

@@ -284,3 +296,3 @@ - Added Mocha Unit tests

### Features and Improvements
### 💡 Features and Improvements

@@ -291,3 +303,3 @@ - Add support for top level combined selectors containing our container class

### Bug Fixes
### 🐛 Bug Fixes

@@ -298,5 +310,5 @@ - Updated ignores to help npm

### Features and Improvements
### 💡 Features and Improvements
- Initial repository scaffold
- Basic plugin implementation
# [PostCSS Prefix Wrap](./README.md) // Contributing
Outlines how to contribute to the development of PostCSS Prefix Wrap.
- [Core Maintainers](#core-maintainers)
- [Thanks](#thanks)

@@ -9,2 +12,6 @@ - [Continuous Integration](#continuous-integration)

## Core Maintainers
- [Daniel Tedman](https://github.com/dbtedman)
## Thanks

@@ -22,6 +29,12 @@

```bash
```shell
yarn format
```
Alternatively, you can check if the code is already formatted correctly by executing the lint job instead.
```shell
yarn lint
```
## Test

@@ -31,10 +44,20 @@

```bash
```shell
yarn test
```
Our test suite contains the following kinds of tests:
- **Unit** - Does each unit of code perform its intended purpose, and do we handle potential error cases correctly.
- **Integration** - Can our plugin be loaded into PostCSS and then executed correctly.
- **Acceptance** - Does our plugin perform the correct operations based on provided configuration.
## Publishing
Update `CHANGELOG.md` and `package.json` with details on the updated release version.
> ⚠️ Publishing new releases can only be completed by the [Core Maintainers](#core-maintainers).
Then [Publish a new release](https://github.com/dbtedman/postcss-prefixwrap/releases/new) to trigger publishing a new version of this package.
1. Update `CHANGELOG.md` and `package.json` with details on the updated release version.
2. Commit these changes, and merge them into master 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.
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.
{
"name": "postcss-prefixwrap",
"version": "1.22.2",
"version": "1.23.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.",

@@ -23,2 +23,3 @@ "license": "MIT",

"main": "./build/index.js",
"types": "./build/index.d.ts",
"files": [

@@ -39,22 +40,21 @@ "*.md",

"devDependencies": {
"@babel/core": "7.14.0",
"@babel/core": "7.14.5",
"@types/jest": "26.0.23",
"@types/node": "15.0.1",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"codecov": "3.8.1",
"eslint": "7.25.0",
"@types/node": "15.12.2",
"@typescript-eslint/eslint-plugin": "4.26.1",
"@typescript-eslint/parser": "4.26.1",
"eslint": "7.28.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-promise": "5.1.0",
"eslint-plugin-security-node": "1.0.14",
"jest": "26.6.3",
"jest": "27.0.4",
"postcss": "8.1.0",
"postcss7": "npm:postcss@7.0.34",
"prettier": "2.2.1",
"ts-jest": "26.5.5",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"prettier": "2.3.1",
"ts-jest": "27.0.3",
"ts-node": "10.0.0",
"typescript": "4.3.2"
}
}
# [PostCSS Prefix Wrap](https://danieltedman.com/my-work/postcss-prefixwrap)
✅ Supports PostCSS v7 or v8
[![CI Build Test](https://github.com/dbtedman/postcss-prefixwrap/workflows/ci/badge.svg)](https://github.com/dbtedman/postcss-prefixwrap/actions?workflow=ci)
[![Test Code Coverage](https://codecov.io/gh/dbtedman/postcss-prefixwrap/branch/master/graph/badge.svg)](https://codecov.io/gh/dbtedman/postcss-prefixwrap)
[![Package Downloads (Weekly)](https://badgen.net/npm/dw/postcss-prefixwrap?label=downloads&style=flat)](https://www.npmjs.com/package/postcss-prefixwrap)
[![Known Vulnerabilities](https://snyk.io/test/github/dbtedman/postcss-prefixwrap/badge.svg)](https://snyk.io/test/github/dbtedman/postcss-prefixwrap)
[![Package Health](https://snyk.io/advisor/npm-package/postcss-prefixwrap/badge.svg)](https://snyk.io/advisor/npm-package/postcss-prefixwrap)
[![Package Size](https://badgen.net/bundlephobia/min/postcss-prefixwrap)](https://bundlephobia.com/package/postcss-prefixwrap)
[![Dependency Count](https://badgen.net/bundlephobia/dependency-count/postcss-prefixwrap)](https://bundlephobia.com/package/postcss-prefixwrap)
A [PostCSS](https://postcss.org) plugin which prepends a selector to CSS styles to constrain their effect on parent elements in a page.
A [PostCSS](https://postcss.org) plugin which prepends a selector to CSS styles to constrain their effect on parent
elements in a page.
| Supports | Versions |
| :------- | :------------------ |
| NodeJS | `v12`, `v14`, `v16` |
| PostCSS | `v7`, `v8` |
- [How to use this plugin?](#how-to-use-this-plugin)

@@ -19,18 +26,12 @@ - [What options does it have?](#what-options-does-it-have)

> These instructions are only for this plugin. See the [PostCSS](http://postcss.org) website for framework information.
> ⚠️ These instructions are only for this plugin. See the [PostCSS](http://postcss.org) website for framework information.
### Install
Using [Yarn](https://yarnpkg.com/en/package/postcss-prefixwrap)
| Package Manager | Command |
| :-------------------------------------------------------- | :------------------------------------------------------- |
| [NPM](https://www.npmjs.com/package/postcss-prefixwrap) | `npm install postcss-prefixwrap --save-dev --save-exact` |
| [PNPM](https://pnpm.io) | `pnpm add postcss-prefixwrap --save-dev --save-exact` |
| [Yarn](https://yarnpkg.com/en/package/postcss-prefixwrap) | `yarn add postcss-prefixwrap --dev --exact` |
```bash
yarn add postcss-prefixwrap --dev --exact
```
Using [NPM](https://www.npmjs.com/package/postcss-prefixwrap)
```bash
npm install postcss-prefixwrap --save-dev --save-exact
```
### Configure

@@ -111,3 +112,4 @@

You may want root tags, like `body` and `html` to be converted to classes, then prefixed, this is enabled using the `prefixRootTags` option.
You may want root tags, like `body` and `html` to be converted to classes, then prefixed, this is enabled using
the `prefixRootTags` option.

@@ -120,7 +122,9 @@ ```javascript

With this option, a selector like `html` will be converted to `.my-container .html`, rather than the default `.my-container`.
With this option, a selector like `html` will be converted to `.my-container .html`, rather than the
default `.my-container`.
### File Whitelist
In certain scenarios, you may only want `PrefixWrap()` to wrap certain CSS files. This is done using the `whitelist` option.
In certain scenarios, you may only want `PrefixWrap()` to wrap certain CSS files. This is done using the `whitelist`
option.

@@ -135,3 +139,4 @@ ```javascript

In certain scenarios, you may want `PrefixWrap()` to exclude certain CSS files. This is done using the `blacklist` option.
In certain scenarios, you may want `PrefixWrap()` to exclude certain CSS files. This is done using the `blacklist`
option.

@@ -152,3 +157,4 @@ > If `whitelist` option is also included, `blacklist` will be ignored.

Read our [Security Guide](SECURITY.md) to learn how security is considered during the development and operation of this plugin.
Read our [Security Guide](SECURITY.md) to learn how security is considered during the development and operation of this
plugin.

@@ -155,0 +161,0 @@ ## License

# [PostCSS Prefix Wrap](./README.md) // Security
Outlines how security is considered during the development of PostCSS Prefix Wrap.
- [Dependency Vulnerability Scanning](#dependency-vulnerability-scanning)

@@ -13,3 +15,3 @@ - [Security Disclosure Policy](#security-disclosure-policy)

Provided by [Snyk](https://snyk.io/test/github/dbtedman/postcss-prefixwrap) for validating package dependencies.
Provided by [Snyk](https://snyk.io/test/github/dbtedman/postcss-prefixwrap) for validating package dependencies and [Dependabot](https://dependabot.com) for automated package updates.

@@ -16,0 +18,0 @@ ## Security Disclosure Policy

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc