Socket
Socket
Sign inDemoInstall

postcss

Package Overview
Dependencies
Maintainers
1
Versions
259
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.27 to 8.4.28

21

lib/lazy-result.d.ts

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

import Document from './document.js'
import { SourceMap } from './postcss.js'

@@ -21,3 +22,5 @@ import Processor from './processor.js'

*/
declare class LazyResult_ implements PromiseLike<Result> {
declare class LazyResult_<RootNode = Document | Root>
implements PromiseLike<Result<RootNode>>
{
/**

@@ -37,3 +40,3 @@ * Processes input CSS through synchronous and asynchronous plugins

*/
catch: Promise<Result>['catch']
catch: Promise<Result<RootNode>>['catch']

@@ -52,3 +55,3 @@ /**

*/
finally: Promise<Result>['finally']
finally: Promise<Result<RootNode>>['finally']

@@ -68,3 +71,3 @@ /**

*/
then: Promise<Result>['then']
then: Promise<Result<RootNode>>['then']

@@ -83,3 +86,3 @@ /**

*/
async(): Promise<Result>
async(): Promise<Result<RootNode>>

@@ -153,3 +156,3 @@ /**

*/
get root(): Root
get root(): RootNode

@@ -167,3 +170,3 @@ /**

*/
sync(): Result
sync(): Result<RootNode>

@@ -190,4 +193,6 @@ /**

declare class LazyResult extends LazyResult_ {}
declare class LazyResult<
RootNode = Document | Root
> extends LazyResult_<RootNode> {}
export = LazyResult

@@ -25,8 +25,8 @@ import LazyResult from './lazy-result.js'

*/
declare class NoWorkResult_ implements LazyResult {
catch: Promise<Result>['catch']
finally: Promise<Result>['finally']
then: Promise<Result>['then']
declare class NoWorkResult_ implements LazyResult<Root> {
catch: Promise<Result<Root>>['catch']
finally: Promise<Result<Root>>['finally']
then: Promise<Result<Root>>['then']
constructor(processor: Processor, css: string, opts: ResultOptions)
async(): Promise<Result>
async(): Promise<Result<Root>>
get content(): string

@@ -40,3 +40,3 @@ get css(): string

get [Symbol.toStringTag](): string
sync(): Result
sync(): Result<Root>
toString(): string

@@ -43,0 +43,0 @@ warnings(): Warning[]

@@ -335,2 +335,3 @@ 'use strict'

this.current.raws.after = (this.current.raws.after || '') + this.spaces
this.root.source.end = this.getPosition(this.tokenizer.position())
}

@@ -337,0 +338,0 @@

@@ -239,7 +239,7 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'

export interface Syntax {
export interface Syntax<RootNode = Document | Root> {
/**
* Function to generate AST by string.
*/
parse?: Parser
parse?: Parser<RootNode>

@@ -308,3 +308,3 @@ /**

export interface ProcessOptions {
export interface ProcessOptions<RootNode = Document | Root> {
/**

@@ -324,3 +324,3 @@ * The path of the CSS source file. You should always set `from`,

*/
parser?: Parser | Syntax
parser?: Parser<RootNode> | Syntax<RootNode>

@@ -330,3 +330,3 @@ /**

*/
stringifier?: Stringifier | Syntax
stringifier?: Stringifier | Syntax<RootNode>

@@ -336,3 +336,3 @@ /**

*/
syntax?: Syntax
syntax?: Syntax<RootNode>

@@ -339,0 +339,0 @@ /**

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

import Document from './document.js'
import LazyResult from './lazy-result.js'

@@ -75,5 +76,8 @@ import NoWorkResult from './no-work-result.js'

process(
css: { toString(): string } | LazyResult | Result | Root | string
): LazyResult | NoWorkResult
process<RootNode extends Document | Root = Root>(
css: { toString(): string } | LazyResult | Result | Root | string,
options?: ProcessOptions
): LazyResult | NoWorkResult
options: ProcessOptions<RootNode>
): LazyResult<RootNode>

@@ -80,0 +84,0 @@ /**

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

constructor(plugins = []) {
this.version = '8.4.27'
this.version = '8.4.28'
this.plugins = this.normalize(plugins)

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

@@ -63,3 +63,3 @@ import {

*/
declare class Result_ {
declare class Result_<RootNode = Document | Root> {
/**

@@ -145,3 +145,3 @@ * A CSS string representing of `Result#root`.

*/
root: Document | Root
root: RootNode

@@ -153,3 +153,3 @@ /**

*/
constructor(processor: Processor, root: Document | Root, opts: Result.ResultOptions)
constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions)

@@ -207,4 +207,4 @@ /**

declare class Result extends Result_ {}
declare class Result<RootNode = Document | Root> extends Result_<RootNode> {}
export = Result
{
"name": "postcss",
"version": "8.4.27",
"version": "8.4.28",
"description": "Tool for transforming styles with JS plugins",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc