Socket
Socket
Sign inDemoInstall

postcss

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss - npm Package Compare versions

Comparing version 8.4.40 to 8.4.41

46

lib/at-rule.d.ts

@@ -83,14 +83,2 @@ import Container, {

/**
* The at-rule’s name immediately follows the `@`.
*
* ```js
* const root = postcss.parse('@media print {}')
* const media = root.first
* media.name //=> 'media'
* ```
*/
get name(): string
set name(value: string)
/**
* An array containing the layer’s children.

@@ -114,3 +102,26 @@ *

nodes: Container['nodes']
parent: ContainerWithChildren | undefined
raws: AtRule.AtRuleRaws
type: 'atrule'
constructor(defaults?: AtRule.AtRuleProps)
assign(overrides: AtRule.AtRuleProps | object): this
clone(overrides?: Partial<AtRule.AtRuleProps>): this
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
/**
* The at-rule’s name immediately follows the `@`.
*
* ```js
* const root = postcss.parse('@media print {}')
* const media = root.first
* media.name //=> 'media'
* ```
*/
get name(): string
set name(value: string)
/**
* The at-rule’s parameters, the values that follow the at-rule’s name

@@ -127,13 +138,2 @@ * but precede any `{}` block.

set params(value: string)
parent: ContainerWithChildren | undefined
raws: AtRule.AtRuleRaws
type: 'atrule'
constructor(defaults?: AtRule.AtRuleProps)
assign(overrides: AtRule.AtRuleProps | object): this
clone(overrides?: Partial<AtRule.AtRuleProps>): AtRule
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): AtRule
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): AtRule
}

@@ -140,0 +140,0 @@

@@ -51,2 +51,10 @@ import Container from './container.js'

raws: Comment.CommentRaws
type: 'comment'
constructor(defaults?: Comment.CommentProps)
assign(overrides: Comment.CommentProps | object): this
clone(overrides?: Partial<Comment.CommentProps>): this
cloneAfter(overrides?: Partial<Comment.CommentProps>): this
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
/**

@@ -57,10 +65,2 @@ * The comment's text.

set text(value: string)
type: 'comment'
constructor(defaults?: Comment.CommentProps)
assign(overrides: Comment.CommentProps | object): this
clone(overrides?: Partial<Comment.CommentProps>): Comment
cloneAfter(overrides?: Partial<Comment.CommentProps>): Comment
cloneBefore(overrides?: Partial<Comment.CommentProps>): Comment
}

@@ -67,0 +67,0 @@

@@ -27,3 +27,3 @@ import AtRule from './at-rule.js'

export interface ContainerProps extends NodeProps {
nodes?: (ChildNode | ChildProps)[]
nodes?: (Node | ChildProps)[]
}

@@ -88,5 +88,5 @@

assign(overrides: Container.ContainerProps | object): this
clone(overrides?: Partial<Container.ContainerProps>): Container<Child>
cloneAfter(overrides?: Partial<Container.ContainerProps>): Container<Child>
cloneBefore(overrides?: Partial<Container.ContainerProps>): Container<Child>
clone(overrides?: Partial<Container.ContainerProps>): this
cloneAfter(overrides?: Partial<Container.ContainerProps>): this
cloneBefore(overrides?: Partial<Container.ContainerProps>): this

@@ -166,4 +166,4 @@ /**

newNode:
| Child
| Child[]
| Node
| Node[]
| ChildProps

@@ -189,4 +189,4 @@ | ChildProps[]

newNode:
| Child
| Child[]
| Node
| Node[]
| ChildProps

@@ -193,0 +193,0 @@ | ChildProps[]

@@ -201,3 +201,3 @@ 'use strict'

nodes = [new Declaration(nodes)]
} else if (nodes.selector) {
} else if (nodes.selector || nodes.selectors) {
nodes = [new Rule(nodes)]

@@ -204,0 +204,0 @@ } else if (nodes.name) {

@@ -66,2 +66,15 @@ import { ContainerWithChildren } from './container.js'

declare class Declaration_ extends Node {
parent: ContainerWithChildren | undefined
raws: Declaration.DeclarationRaws
type: 'decl'
constructor(defaults?: Declaration.DeclarationProps)
assign(overrides: Declaration.DeclarationProps | object): this
clone(overrides?: Partial<Declaration.DeclarationProps>): this
cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this
cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this
/**

@@ -82,6 +95,4 @@ * It represents a specificity of the declaration.

get important(): boolean
set important(value: boolean)
parent: ContainerWithChildren | undefined
/**

@@ -98,8 +109,4 @@ * The property name for a CSS declaration.

get prop(): string
set prop(value: string)
raws: Declaration.DeclarationRaws
type: 'decl'
/**

@@ -124,3 +131,2 @@ * The property value for a CSS declaration.

set value(value: string)
/**

@@ -145,9 +151,2 @@ * It represents a getter that returns `true` if a declaration starts with

get variable(): boolean
set varaible(value: string)
constructor(defaults?: Declaration.DeclarationProps)
assign(overrides: Declaration.DeclarationProps | object): this
clone(overrides?: Partial<Declaration.DeclarationProps>): Declaration
cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): Declaration
cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): Declaration
}

@@ -154,0 +153,0 @@

@@ -45,5 +45,5 @@ import Container, { ContainerProps } from './container.js'

assign(overrides: Document.DocumentProps | object): this
clone(overrides?: Partial<Document.DocumentProps>): Document
cloneAfter(overrides?: Partial<Document.DocumentProps>): Document
cloneBefore(overrides?: Partial<Document.DocumentProps>): Document
clone(overrides?: Partial<Document.DocumentProps>): this
cloneAfter(overrides?: Partial<Document.DocumentProps>): this
cloneBefore(overrides?: Partial<Document.DocumentProps>): this

@@ -50,0 +50,0 @@ /**

@@ -190,2 +190,5 @@ import { CssSyntaxError, ProcessOptions } from './postcss.js'

get from(): string
/** Converts this to a JSON-friendly object representation. */
toJSON(): object
}

@@ -192,0 +195,0 @@

@@ -54,5 +54,4 @@ declare namespace list {

// eslint-disable-next-line @typescript-eslint/no-redeclare
declare const list: list.List
export = list

@@ -78,3 +78,3 @@ 'use strict'

} else if (this.css) {
this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '')
this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '')
}

@@ -81,0 +81,0 @@ }

@@ -306,3 +306,3 @@ import AtRule = require('./at-rule.js')

*/
clone(overrides?: object): Node
clone(overrides?: object): this

@@ -316,3 +316,3 @@ /**

*/
cloneAfter(overrides?: object): Node
cloneAfter(overrides?: object): this

@@ -331,3 +331,3 @@ /**

*/
cloneBefore(overrides?: object): Node
cloneBefore(overrides?: object): this

@@ -478,4 +478,4 @@ /**

...nodes: (
| Node.ChildNode
| Node.ChildNode[]
| Node
| Node[]
| Node.ChildProps

@@ -482,0 +482,0 @@ | Node.ChildProps[]

@@ -31,3 +31,6 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'

) => Promise<void> | void
type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise<void> | void
type RootProcessor = (
root: Root,
helper: postcss.Helpers
) => Promise<void> | void
type DeclarationProcessor = (

@@ -37,4 +40,10 @@ decl: Declaration,

) => Promise<void> | void
type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise<void> | void
type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise<void> | void
type RuleProcessor = (
rule: Rule,
helper: postcss.Helpers
) => Promise<void> | void
type AtRuleProcessor = (
atRule: AtRule,
helper: postcss.Helpers
) => Promise<void> | void
type CommentProcessor = (

@@ -181,5 +190,5 @@ comment: Comment,

export type SourceMap = SourceMapGenerator & {
export type SourceMap = {
toJSON(): RawSourceMap
}
} & SourceMapGenerator

@@ -186,0 +195,0 @@ export type Helpers = { postcss: Postcss; result: Result } & Postcss

@@ -44,8 +44,10 @@ 'use strict'

if (charsetUri.test(text) || uri.test(text)) {
return decodeURIComponent(text.substr(RegExp.lastMatch.length))
let uriMatch = text.match(charsetUri) || text.match(uri)
if (uriMatch) {
return decodeURIComponent(text.substr(uriMatch[0].length))
}
if (baseCharsetUri.test(text) || baseUri.test(text)) {
return fromBase64(text.substr(RegExp.lastMatch.length))
let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)
if (baseUriMatch) {
return fromBase64(text.substr(baseUriMatch[0].length))
}

@@ -71,3 +73,3 @@

loadAnnotation(css) {
let comments = css.match(/\/\*\s*# sourceMappingURL=/gm)
let comments = css.match(/\/\*\s*# sourceMappingURL=/g)
if (!comments) return

@@ -74,0 +76,0 @@

@@ -10,3 +10,3 @@ 'use strict'

constructor(plugins = []) {
this.version = '8.4.40'
this.version = '8.4.41'
this.plugins = this.normalize(plugins)

@@ -13,0 +13,0 @@ }

@@ -42,3 +42,2 @@ import {

// eslint-disable-next-line @typescript-eslint/no-use-before-define

@@ -45,0 +44,0 @@ export { Result_ as default }

@@ -65,5 +65,5 @@ import Container, { ContainerProps } from './container.js'

assign(overrides: object | Root.RootProps): this
clone(overrides?: Partial<Root.RootProps>): Root
cloneAfter(overrides?: Partial<Root.RootProps>): Root
cloneBefore(overrides?: Partial<Root.RootProps>): Root
clone(overrides?: Partial<Root.RootProps>): this
cloneAfter(overrides?: Partial<Root.RootProps>): this
cloneBefore(overrides?: Partial<Root.RootProps>): this

@@ -70,0 +70,0 @@ /**

@@ -43,10 +43,17 @@ import Container, {

export interface RuleProps extends ContainerProps {
export type RuleProps = ContainerProps & {
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: RuleRaws
/** Selector or selectors of the rule. */
selector?: string
/** Selectors of the rule represented as an array of strings. */
selectors?: string[]
}
} & (
| {
/** Selector or selectors of the rule. */
selector: string
selectors?: never
}
| {
/** Selectors of the rule represented as an array of strings. */
selectors: string[]
selector?: never
}
)

@@ -79,2 +86,11 @@ // eslint-disable-next-line @typescript-eslint/no-use-before-define

raws: Rule.RuleRaws
type: 'rule'
constructor(defaults?: Rule.RuleProps)
assign(overrides: object | Rule.RuleProps): this
clone(overrides?: Partial<Rule.RuleProps>): this
cloneAfter(overrides?: Partial<Rule.RuleProps>): this
cloneBefore(overrides?: Partial<Rule.RuleProps>): this
/**

@@ -90,4 +106,3 @@ * The rule’s full selector represented as a string.

get selector(): string
set selector(value: string);
set selector(value: string)
/**

@@ -109,11 +124,3 @@ * An array containing the rule’s individual selectors.

get selectors(): string[]
set selectors(values: string[]);
type: 'rule'
constructor(defaults?: Rule.RuleProps)
assign(overrides: object | Rule.RuleProps): this
clone(overrides?: Partial<Rule.RuleProps>): Rule
cloneAfter(overrides?: Partial<Rule.RuleProps>): Rule
cloneBefore(overrides?: Partial<Rule.RuleProps>): Rule
set selectors(values: string[])
}

@@ -120,0 +127,0 @@

{
"name": "postcss",
"version": "8.4.40",
"version": "8.4.41",
"description": "Tool for transforming styles with JS plugins",

@@ -5,0 +5,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

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