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

@swc/css

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc/css - npm Package Compare versions

Comparing version 0.0.20 to 0.0.24

22

binding.d.ts

@@ -7,16 +7,14 @@ /* tslint:disable */

export interface Diagnostic {
level: string;
message: string;
span: any;
level: string
message: string
span: any
}
export interface TransformOutput {
code: string;
map?: string;
errors?: Array<Diagnostic>;
code: string
map?: string
errors?: Array<Diagnostic>
}
export function minify(
code: Buffer,
opts: Buffer,
signal?: AbortSignal | undefined | null
): Promise<TransformOutput>;
export function minifySync(code: Buffer, opts: Buffer): TransformOutput;
export function minify(code: Buffer, opts: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>
export function minifySync(code: Buffer, opts: Buffer): TransformOutput
export function transform(code: Buffer, opts: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>
export function transformSync(code: Buffer, opts: Buffer): TransformOutput

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.minifySync = exports.minify = void 0;
exports.transformSync = exports.transform = exports.minifySync = exports.minify = void 0;
const binding = __importStar(require("./binding"));

@@ -37,4 +37,12 @@ async function minify(content, options) {

exports.minifySync = minifySync;
async function transform(content, options) {
return binding.transform(content, toBuffer(options !== null && options !== void 0 ? options : {}));
}
exports.transform = transform;
function transformSync(content, options) {
return binding.transformSync(content, toBuffer(options !== null && options !== void 0 ? options : {}));
}
exports.transformSync = transformSync;
function toBuffer(t) {
return Buffer.from(JSON.stringify(t));
}
import * as binding from "./binding";
export type Options = {
export type MinifyOptions = {
filename?: string;

@@ -8,5 +8,19 @@ sourceMap?: boolean;

export type TransformOptions = {
filename?: string;
sourceMap?: boolean
cssModules?: CssModuleTransformOptions
minify?: boolean
}
export type CssModuleTransformOptions = {
pattern: String,
}
export async function minify(
content: Buffer,
options: Options
options: MinifyOptions
): Promise<binding.TransformOutput> {

@@ -16,8 +30,19 @@ return binding.minify(content, toBuffer(options ?? {}));

export function minifySync(content: Buffer, options: Options) {
export function minifySync(content: Buffer, options: MinifyOptions) {
return binding.minifySync(content, toBuffer(options ?? {}));
}
export async function transform(
content: Buffer,
options: TransformOptions
): Promise<binding.TransformOutput> {
return binding.transform(content, toBuffer(options ?? {}));
}
export function transformSync(content: Buffer, options: TransformOptions) {
return binding.transformSync(content, toBuffer(options ?? {}));
}
function toBuffer(t: any): Buffer {
return Buffer.from(JSON.stringify(t));
}
{
"name": "@swc/css",
"version": "0.0.20",
"packageManager": "yarn@3.2.3",
"version": "0.0.24",
"description": "Super-fast alternative for postcss",

@@ -29,3 +30,2 @@ "homepage": "https://swc.rs",

"x86_64-unknown-linux-musl",
"x86_64-unknown-freebsd",
"i686-pc-windows-msvc",

@@ -57,17 +57,20 @@ "aarch64-unknown-linux-gnu",

},
"devDependencies": {
"@napi-rs/cli": "^2.16.1",
"typescript": "^5.1.6"
},
"optionalDependencies": {
"@swc/css-win32-x64-msvc": "0.0.20",
"@swc/css-darwin-x64": "0.0.20",
"@swc/css-linux-x64-gnu": "0.0.20",
"@swc/css-linux-x64-musl": "0.0.20",
"@swc/css-freebsd-x64": "0.0.20",
"@swc/css-win32-ia32-msvc": "0.0.20",
"@swc/css-linux-arm64-gnu": "0.0.20",
"@swc/css-linux-arm-gnueabihf": "0.0.20",
"@swc/css-darwin-arm64": "0.0.20",
"@swc/css-android-arm64": "0.0.20",
"@swc/css-linux-arm64-musl": "0.0.20",
"@swc/css-win32-arm64-msvc": "0.0.20",
"@swc/css-android-arm-eabi": "0.0.20"
"@swc/css-win32-x64-msvc": "0.0.24",
"@swc/css-darwin-x64": "0.0.24",
"@swc/css-linux-x64-gnu": "0.0.24",
"@swc/css-linux-x64-musl": "0.0.24",
"@swc/css-win32-ia32-msvc": "0.0.24",
"@swc/css-linux-arm64-gnu": "0.0.24",
"@swc/css-linux-arm-gnueabihf": "0.0.24",
"@swc/css-darwin-arm64": "0.0.24",
"@swc/css-android-arm64": "0.0.24",
"@swc/css-linux-arm64-musl": "0.0.24",
"@swc/css-win32-arm64-msvc": "0.0.24",
"@swc/css-android-arm-eabi": "0.0.24"
}
}
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