Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-prefixwrap

Package Overview
Dependencies
Maintainers
0
Versions
76
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.50.0 to 1.51.0

6

build/internal/domain/CSSRuleWrapper.d.ts

@@ -1,3 +0,3 @@

import { PostCSSRule } from "../../Types";
export declare const prefixWrapCSSRule: (cssRule: PostCSSRule, nested: string | null, ignoredSelectors: (string | RegExp)[], prefixSelector: string, prefixRootTags: boolean) => void;
export declare const prefixWrapCSSSelector: (cssSelector: string, cssRule: PostCSSRule, nested: string | null, ignoredSelectors: (string | RegExp)[], prefixSelector: string, prefixRootTags: boolean) => string | null;
import { Rule } from "postcss";
export declare const prefixWrapCSSRule: (cssRule: Rule, nested: string | null, ignoredSelectors: (string | RegExp)[], prefixSelector: string, prefixRootTags: boolean) => void;
export declare const prefixWrapCSSSelector: (cssSelector: string, cssRule: Rule, nested: string | null, ignoredSelectors: (string | RegExp)[], prefixSelector: string, prefixRootTags: boolean) => string | null;

@@ -8,5 +8,3 @@ "use strict";

// this happens, don't try to prefix that selector.
const rules = cssRule.selector
.split(",")
.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
const rules = cssRule.selectors.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
if (rules.length === 0) {

@@ -13,0 +11,0 @@ return;

@@ -1,5 +0,5 @@

import { PostCSSRule } from "../../Types";
import { Rule } from "postcss";
export declare const isValidCSSSelector: (cssSelector: string | null) => boolean;
export declare const cleanSelector: (cssSelector: string) => string;
export declare const isKeyframes: (cssRule: PostCSSRule) => boolean;
export declare const isKeyframes: (cssRule: Rule) => boolean;
export declare const isNotRootTag: (cleanSelector: string) => boolean;

@@ -6,0 +6,0 @@ export declare const cssRuleMatchesPrefixSelector: (cssRule: {

@@ -1,2 +0,2 @@

import { PostCSS7PostCSS } from "../Types";
export declare const asPostCSSv7PluginGenerator: (postcss: PostCSS7PostCSS) => import("../Types").PostCSS8Plugin;
import { PostcssV7 } from "../Types";
export declare const asPostCSSv7PluginGenerator: (postcss: PostcssV7) => import("../Types").PostCSS8Plugin;

@@ -1,4 +0,5 @@

import { PostCSS7PostCSS, PostCSS8PostCSS, PostCSSAcceptedPlugin } from "../Types";
import { Postcss } from "postcss";
import { PostcssV7, PostCSSAcceptedPlugin } from "../Types";
import { PostCSSPrefixWrapOptions } from "./PostCSSPrefixWrap";
export declare const isPostCSSv8: (postcss: PostCSS7PostCSS | PostCSS8PostCSS) => boolean;
export declare const isPostCSSv8: (postcss: PostcssV7 | Postcss) => boolean;
export declare const asPostCSSv8PluginGenerator: () => (prefixSelector: string, options?: PostCSSPrefixWrapOptions) => PostCSSAcceptedPlugin;

@@ -1,3 +0,4 @@

import { PostCSS7Plugin, PostCSS7PostCSS, PostCSS8Plugin, PostCSS8PostCSS } from "../Types";
declare const _default: (postcss: PostCSS7PostCSS | PostCSS8PostCSS) => PostCSS7Plugin | PostCSS8Plugin;
import { Postcss } from "postcss";
import { PostCSS7Plugin, PostcssV7, PostCSS8Plugin } from "../Types";
declare const _default: (postcss: PostcssV7 | Postcss) => PostCSS7Plugin | PostCSS8Plugin;
export = _default;

@@ -1,2 +0,2 @@

import { PostCSSContainer } from "../Types";
import { Container } from "postcss";
export declare const PLUGIN_NAME = "postcss-prefixwrap";

@@ -19,4 +19,4 @@ export interface PostCSSPrefixWrapOptions {

constructor(prefixSelector: string, options?: PostCSSPrefixWrapOptions);
prefixRoot(css: PostCSSContainer): void;
prefix(): (css: PostCSSContainer) => void;
prefixRoot(css: Container): void;
prefix(): (css: Container) => void;
}

@@ -0,31 +1,11 @@

import { AcceptedPlugin, Root } from "postcss";
import { PostCSSPrefixWrapOptions } from "./plugin/PostCSSPrefixWrap";
export interface PostCSSInput {
file?: string;
}
export interface PostCSSSource {
input: PostCSSInput;
}
export interface PostCSSContainer {
source?: PostCSSSource;
parent?: PostCSSContainer;
type?: string;
walkRules: (callback: (atRule: PostCSSRule) => void) => void;
}
export interface PostCSSRule extends PostCSSContainer {
selector: string;
}
export interface PostCSSAtRule extends PostCSSContainer {
name: string;
}
export interface PostCSSAcceptedPlugin {
postcssPlugin: string;
Once(root: PostCSSContainer): void;
Once(root: Root): void;
}
export interface PostCSS7PostCSS {
export interface PostcssV7 {
plugin: (name: string, thing: (prefixSelector: string, options?: PostCSSPrefixWrapOptions) => void) => PostCSS8Plugin;
}
export interface PostCSS8PostCSS {
Root: any;
}
export type PostCSS7Plugin = () => PostCSSAcceptedPlugin;
export type PostCSS8Plugin = (prefixSelector: string, options?: PostCSSPrefixWrapOptions) => PostCSSAcceptedPlugin;
export type PostCSS7Plugin = () => AcceptedPlugin;
export type PostCSS8Plugin = (prefixSelector: string, options?: PostCSSPrefixWrapOptions) => AcceptedPlugin;

@@ -7,2 +7,12 @@ # [PostCSS Prefix Wrap](./README.md) // Changelog

## [1.51.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.51.0)
### 💡 Features and Improvements
- Use real types from plugin source.
### 🐛 Bug Fixes
- [#515](https://github.com/dbtedman/postcss-prefixwrap/issues/515) Correctly handle `:where` statement.
## [1.50.0](https://github.com/dbtedman/postcss-prefixwrap/releases/tag/1.50.0)

@@ -9,0 +19,0 @@

{
"name": "postcss-prefixwrap",
"version": "1.50.0",
"version": "1.51.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.",

@@ -35,4 +35,4 @@ "keywords": [

"@types/node": "20.14.11",
"@typescript-eslint/eslint-plugin": "7.16.1",
"@typescript-eslint/parser": "7.16.1",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"eslint": "8.57.0",

@@ -48,5 +48,5 @@ "eslint-config-prettier": "9.1.0",

"glob": "11.0.0",
"husky": "9.1.1",
"husky": "9.1.4",
"jest": "29.7.0",
"postcss": "8.4.39",
"postcss": "8.4.40",
"prettier": "3.3.3",

@@ -53,0 +53,0 @@ "sort-package-json": "2.10.0",

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