Socket
Socket
Sign inDemoInstall

svelte-preprocess

Package Overview
Dependencies
Maintainers
2
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-preprocess - npm Package Compare versions

Comparing version 4.10.1 to 4.10.2

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## [4.10.2](https://github.com/sveltejs/svelte-preprocess/compare/v4.10.1...v4.10.2) (2022-01-17)
### Bug Fixes
* accept less v4 as peer dep ([#455](https://github.com/sveltejs/svelte-preprocess/issues/455)) ([fbc484a](https://github.com/sveltejs/svelte-preprocess/commit/fbc484a6d0394928c1318b70dfe007fed1d9fdac))
* better pug error message ([#448](https://github.com/sveltejs/svelte-preprocess/issues/448)) ([a239e82](https://github.com/sveltejs/svelte-preprocess/commit/a239e829295bde5f62383697266cefe7767dd0e2)), closes [#447](https://github.com/sveltejs/svelte-preprocess/issues/447)
* provide caller information to Babel ([#449](https://github.com/sveltejs/svelte-preprocess/issues/449)) ([51007ab](https://github.com/sveltejs/svelte-preprocess/commit/51007abf946ffdd1d407c6bcf86439d38e113626))
* ts preprocessor - consider store suffixed with number ([#461](https://github.com/sveltejs/svelte-preprocess/issues/461)) ([a7a94cf](https://github.com/sveltejs/svelte-preprocess/commit/a7a94cfb29f6ea85cfafd1afa2c61363f72cb4b3)), closes [sveltejs/svelte#7120](https://github.com/sveltejs/svelte/issues/7120)
## [4.10.1](https://github.com/sveltejs/svelte-preprocess/compare/v4.10.0...v4.10.1) (2021-12-17)

@@ -2,0 +14,0 @@

@@ -16,2 +16,13 @@ "use strict";

code: true,
caller: {
name: 'svelte-preprocess',
supportsStaticESM: true,
supportsDynamicImport: true,
// this isn't supported by Svelte but let it error with a good error on this syntax untouched
supportsTopLevelAwait: true,
// todo: this can be enabled once all "peer deps" understand this
// this syntax is supported since rollup@1.26.0 and webpack@5.0.0-beta.21
// supportsExportNamespaceFrom: true,
...options === null || options === void 0 ? void 0 : options.caller,
},
};

@@ -18,0 +29,0 @@ const result = await (0, core_1.transformAsync)(content, babelOptions);

17

dist/transformers/pug.js

@@ -62,6 +62,17 @@ "use strict";

const { type: identationType } = (0, detect_indent_1.default)(content);
const code = `${GET_MIXINS(identationType !== null && identationType !== void 0 ? identationType : 'space')}\n${content}`;
const compiled = pug_1.default.compile(code, pugOptions);
const input = `${GET_MIXINS(identationType !== null && identationType !== void 0 ? identationType : 'space')}\n${content}`;
const compiled = pug_1.default.compile(input, pugOptions);
let code;
try {
code = compiled();
}
catch (e) {
// The error message does not have much context, add more of it
if (e instanceof Error) {
e.message = `[svelte-preprocess] Pug error while preprocessing ${filename}\n\n${e.message}`;
}
throw e;
}
return {
code: compiled(),
code,
dependencies: (_a = compiled.dependencies) !== null && _a !== void 0 ? _a : [],

@@ -68,0 +79,0 @@ };

2

dist/transformers/typescript.js

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

// TS transformer (previous attemps have failed)
const codestores = Array.from(contentForCodestores.match(/\$[^\s();:,[\]{}.?!+-=*/\\~|&%<>^`"'ยฐยง]+/g) ||
const codestores = Array.from(contentForCodestores.match(/\$[^\s();:,[\]{}.?!+\-=*/\\~|&%<>^`"'ยฐยง]+/g) ||
[], (name) => name.slice(1)).filter((name) => !utils_1.JAVASCRIPT_RESERVED_KEYWORD_SET.has(name));

@@ -91,0 +91,0 @@ const varsString = [...codestores, ...varnames].join(',');

{
"name": "svelte-preprocess",
"version": "4.10.1",
"version": "4.10.2",
"license": "MIT",

@@ -102,3 +102,3 @@ "main": "dist/index.js",

"sass": "^1.26.8",
"stylus": "^0.54.7",
"stylus": "^0.55.0",
"sugarss": "^2.0.0",

@@ -120,3 +120,3 @@ "svelte": "^3.42.0",

"coffeescript": "^2.5.1",
"less": "^3.11.3",
"less": "^3.11.3 || ^4.0.0",
"postcss": "^7 || ^8",

@@ -126,3 +126,3 @@ "postcss-load-config": "^2.1.0 || ^3.0.0",

"sass": "^1.26.8",
"stylus": "^0.54.7",
"stylus": "^0.55.0",
"sugarss": "^2.0.0",

@@ -129,0 +129,0 @@ "svelte": "^3.23.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