Socket
Socket
Sign inDemoInstall

@vue/compiler-sfc

Package Overview
Dependencies
Maintainers
1
Versions
274
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/compiler-sfc - npm Package Compare versions

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

36

dist/compiler-sfc.cjs.js

@@ -672,4 +672,4 @@ 'use strict';

const scss = {
render(source, map, options) {
const nodeSass = require('sass');
render(source, map, options, load = require) {
const nodeSass = load('sass');
const finalOptions = {

@@ -699,7 +699,7 @@ ...options,

const sass = {
render(source, map, options) {
render(source, map, options, load) {
return scss.render(source, map, {
...options,
indentedSyntax: true
});
}, load);
}

@@ -709,4 +709,4 @@ };

const less = {
render(source, map, options) {
const nodeLess = require('less');
render(source, map, options, load = require) {
const nodeLess = load('less');
let result;

@@ -732,4 +732,4 @@ let error = null;

const styl = {
render(source, map, options) {
const nodeStylus = require('stylus');
render(source, map, options, load = require) {
const nodeStylus = load('stylus');
try {

@@ -763,3 +763,2 @@ const ref = nodeStylus(source);

// const postcss = require('postcss')
function compileStyle(options) {

@@ -775,3 +774,3 @@ return doCompileStyle({

function doCompileStyle(options) {
const { filename, id, scoped = true, trim = true, preprocessLang, postcssOptions, postcssPlugins } = options;
const { filename, id, scoped = false, trim = true, modules = false, modulesOptions = {}, preprocessLang, postcssOptions, postcssPlugins } = options;
const preprocessor = preprocessLang && processors[preprocessLang];

@@ -788,2 +787,16 @@ const preProcessedSource = preprocessor && preprocess$1(options, preprocessor);

}
let cssModules;
if (modules) {
if (options.isAsync) {
plugins.push(require('postcss-modules')({
...modulesOptions,
getJSON: (cssFileName, json) => {
cssModules = json;
}
}));
}
else {
throw new Error('`modules` option can only be used with compileStyleAsync().');
}
}
const postCSSOptions = {

@@ -817,2 +830,3 @@ ...postcssOptions,

errors,
modules: cssModules,
rawResult: result

@@ -845,3 +859,3 @@ }))

...options.preprocessOptions
});
}, options.preprocessCustomRequire);
}

@@ -848,0 +862,0 @@

@@ -20,3 +20,3 @@ import { CodegenResult } from '@vue/compiler-core';

export declare function compileStyleAsync(options: SFCStyleCompileOptions): Promise<SFCStyleCompileResults>;
export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>;

@@ -30,2 +30,14 @@ export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults;

declare interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions {
isAsync?: boolean;
modules?: boolean;
modulesOptions?: {
scopeBehaviour?: 'global' | 'local';
globalModulePaths?: string[];
generateScopedName?: string | ((name: string, filename: string, css: string) => string);
hashPrefix?: string;
localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly';
};
}
export declare interface SFCBlock {

@@ -81,2 +93,3 @@ type: string;

preprocessOptions?: any;
preprocessCustomRequire?: (id: string) => any;
postcssOptions?: any;

@@ -91,2 +104,3 @@ postcssPlugins?: any[];

errors: Error[];
modules?: Record<string, string>;
}

@@ -93,0 +107,0 @@

{
"name": "@vue/compiler-sfc",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"description": "@vue/compiler-sfc",

@@ -30,9 +30,9 @@ "main": "dist/compiler-sfc.cjs.js",

"peerDependencies": {
"vue": "3.0.0-beta.3"
"vue": "3.0.0-beta.4"
},
"dependencies": {
"@vue/shared": "3.0.0-beta.3",
"@vue/compiler-core": "3.0.0-beta.3",
"@vue/compiler-dom": "3.0.0-beta.3",
"@vue/compiler-ssr": "3.0.0-beta.3",
"@vue/compiler-core": "3.0.0-beta.4",
"@vue/compiler-dom": "3.0.0-beta.4",
"@vue/compiler-ssr": "3.0.0-beta.4",
"@vue/shared": "3.0.0-beta.4",
"consolidate": "^0.15.1",

@@ -42,3 +42,4 @@ "hash-sum": "^2.0.0",

"merge-source-map": "^1.1.0",
"postcss": "^7.0.21",
"postcss": "^7.0.27",
"postcss-modules": "^2.0.0",
"postcss-selector-parser": "^6.0.2",

@@ -45,0 +46,0 @@ "source-map": "^0.6.1"

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