Socket
Socket
Sign inDemoInstall

svelte-preprocess

Package Overview
Dependencies
Maintainers
1
Versions
174
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.7.1 to 4.7.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## [4.7.2](https://github.com/sveltejs/svelte-preprocess/compare/v4.7.1...v4.7.2) (2021-04-19)
### Bug Fixes
* 🐛 prevent svelte file from being added to scss dep list ([519b0b6](https://github.com/sveltejs/svelte-preprocess/commit/519b0b6c49ba4a9e0f4adfcc47f03b19d2e28966)), closes [#346](https://github.com/sveltejs/svelte-preprocess/issues/346)
* support ts build with no tsconfig.json ([cf0e44c](https://github.com/sveltejs/svelte-preprocess/commit/cf0e44c26212b496cda8686d2780e7e8f1ac8f7a))
## [4.7.1](https://github.com/sveltejs/svelte-preprocess/compare/v4.7.0...v4.7.1) (2021-04-18)

@@ -2,0 +12,0 @@

17

dist/transformers/scss.js

@@ -8,9 +8,16 @@ "use strict";

let sass;
function getResultForResolve(result) {
function getProcessedResult(result) {
var _a;
return {
// For some reason, scss includes the main 'file' in the array, we don't want that
// Unfortunately I didn't manage to reproduce this in the test env
// More info: https://github.com/sveltejs/svelte-preprocess/issues/346
const absoluteEntryPath = path_1.isAbsolute(result.stats.entry)
? result.stats.entry
: path_1.join(process.cwd(), result.stats.entry);
const processed = {
code: result.css.toString(),
map: (_a = result.map) === null || _a === void 0 ? void 0 : _a.toString(),
dependencies: result.stats.includedFiles,
dependencies: Array.from(result.stats.includedFiles).filter((filepath) => filepath !== absoluteEntryPath),
};
return processed;
}

@@ -69,3 +76,3 @@ const tildeImporter = (url, prev) => {

if (renderSync) {
return getResultForResolve(implementation.renderSync(sassOptions));
return getProcessedResult(implementation.renderSync(sassOptions));
}

@@ -76,3 +83,3 @@ return new Promise((resolve, reject) => {

return reject(err);
resolve(getResultForResolve(result));
resolve(getProcessedResult(result));
});

@@ -79,0 +86,0 @@ });

@@ -45,2 +45,5 @@ "use strict";

typescript_1.default.findConfigFile(fileDirectory, typescript_1.default.sys.fileExists);
if (!tsconfigFile) {
return { errors: [], options: {} };
}
tsconfigFile = path_1.isAbsolute(tsconfigFile)

@@ -47,0 +50,0 @@ ? tsconfigFile

{
"name": "svelte-preprocess",
"version": "4.7.1",
"version": "4.7.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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