@sveltejs/vite-plugin-svelte
Advanced tools
Comparing version 2.4.5 to 2.4.6
{ | ||
"name": "@sveltejs/vite-plugin-svelte", | ||
"version": "2.4.5", | ||
"version": "2.4.6", | ||
"license": "MIT", | ||
@@ -37,9 +37,9 @@ "author": "dominikg", | ||
"dependencies": { | ||
"@sveltejs/vite-plugin-svelte-inspector": "^1.0.4", | ||
"debug": "^4.3.4", | ||
"deepmerge": "^4.3.1", | ||
"kleur": "^4.1.5", | ||
"magic-string": "^0.30.2", | ||
"magic-string": "^0.30.3", | ||
"svelte-hmr": "^0.15.3", | ||
"vitefu": "^0.2.4", | ||
"@sveltejs/vite-plugin-svelte-inspector": "^1.0.3" | ||
"vitefu": "^0.2.4" | ||
}, | ||
@@ -52,4 +52,4 @@ "peerDependencies": { | ||
"@types/debug": "^4.1.8", | ||
"esbuild": "^0.19.0", | ||
"svelte": "^4.1.2", | ||
"esbuild": "^0.19.3", | ||
"svelte": "^4.2.0", | ||
"vite": "^4.4.9" | ||
@@ -56,0 +56,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
import fs from 'fs'; | ||
import fs from 'node:fs'; | ||
import { version as viteVersion } from 'vite'; | ||
@@ -3,0 +3,0 @@ |
@@ -22,3 +22,3 @@ import type { Processed } from 'svelte/types/compiler/preprocess'; | ||
warnings: any[]; // TODO type | ||
vars: { | ||
vars: Array<{ | ||
name: string; | ||
@@ -33,3 +33,3 @@ export_name: string; | ||
referenced_from_script: boolean; | ||
}[]; | ||
}>; | ||
stats: { | ||
@@ -36,0 +36,0 @@ timings: { |
@@ -1,3 +0,3 @@ | ||
import path from 'path'; | ||
import fs from 'fs/promises'; | ||
import path from 'node:path'; | ||
import fs from 'node:fs/promises'; | ||
import { findDepPkgJsonPath } from 'vitefu'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { readFileSync } from 'fs'; | ||
import { readFileSync } from 'node:fs'; | ||
import { compile, preprocess } from 'svelte/compiler'; | ||
@@ -27,3 +27,3 @@ import { log } from './log.js'; | ||
const svelteExtensions = (options.extensions ?? ['.svelte']).map((ext) => ext.slice(1)); | ||
const svelteFilter = new RegExp(`\\.(` + svelteExtensions.join('|') + `)(\\?.*)?$`); | ||
const svelteFilter = new RegExp('\\.(' + svelteExtensions.join('|') + ')(\\?.*)?$'); | ||
/** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ | ||
@@ -110,3 +110,5 @@ let statsCollection; | ||
} | ||
return compiled.js.code + '//# sourceMappingURL=' + compiled.js.map.toUrl(); | ||
return compiled.js.map | ||
? compiled.js.code + '//# sourceMappingURL=' + compiled.js.map.toUrl() | ||
: compiled.js.code; | ||
} |
@@ -1,2 +0,2 @@ | ||
import * as crypto from 'crypto'; | ||
import * as crypto from 'node:crypto'; | ||
@@ -3,0 +3,0 @@ const hashes = Object.create(null); |
import { createFilter, normalizePath } from 'vite'; | ||
import * as fs from 'fs'; | ||
import * as fs from 'node:fs'; | ||
import { log } from './log.js'; | ||
@@ -24,3 +24,3 @@ | ||
function splitId(id) { | ||
const parts = id.split(`?`, 2); | ||
const parts = id.split('?', 2); | ||
const filename = parts[0]; | ||
@@ -27,0 +27,0 @@ const rawQuery = parts[1]; |
@@ -1,2 +0,2 @@ | ||
import fs from 'fs'; | ||
import fs from 'node:fs'; | ||
import { toRollupError } from './error.js'; | ||
@@ -129,5 +129,5 @@ import { log } from './log.js'; | ||
if (Object.prototype.hasOwnProperty.call(object, 'code')) { | ||
exports += `export default code\n`; | ||
exports += 'export default code\n'; | ||
} | ||
return exports; | ||
} |
@@ -1,5 +0,5 @@ | ||
import { createRequire } from 'module'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
import { pathToFileURL } from 'url'; | ||
import { createRequire } from 'node:module'; | ||
import path from 'node:path'; | ||
import fs from 'node:fs'; | ||
import { pathToFileURL } from 'node:url'; | ||
import { log } from './log.js'; | ||
@@ -6,0 +6,0 @@ |
@@ -207,3 +207,4 @@ /* eslint-disable no-console */ | ||
code: 'vite-plugin-svelte-css-no-scopable-elements', | ||
message: `No scopable elements found in template. If you're using global styles in the style tag, you should move it into an external stylesheet file and import it in JS. See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#where-should-i-put-my-global-styles.` | ||
message: | ||
"No scopable elements found in template. If you're using global styles in the style tag, you should move it into an external stylesheet file and import it in JS. See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#where-should-i-put-my-global-styles." | ||
}); | ||
@@ -210,0 +211,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { promises as fs } from 'fs'; | ||
import path from 'path'; | ||
import { promises as fs } from 'node:fs'; | ||
import path from 'node:path'; | ||
@@ -4,0 +4,0 @@ // List of options that changes the prebundling result |
@@ -13,3 +13,3 @@ /* eslint-disable no-unused-vars */ | ||
import path from 'path'; | ||
import path from 'node:path'; | ||
import { esbuildSveltePlugin, facadeEsbuildSveltePluginName } from './esbuild.js'; | ||
@@ -16,0 +16,0 @@ import { addExtraPreprocessors } from './preprocess.js'; |
import MagicString from 'magic-string'; | ||
import { log } from './log.js'; | ||
import path from 'path'; | ||
import path from 'node:path'; | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
import path from 'path'; | ||
import { builtinModules } from 'module'; | ||
import path from 'node:path'; | ||
import { builtinModules } from 'node:module'; | ||
import { resolveDependencyData, isCommonDepWithoutSvelteField } from './dependencies.js'; | ||
@@ -4,0 +4,0 @@ import { normalizePath } from 'vite'; |
@@ -1,2 +0,2 @@ | ||
import path from 'path'; | ||
import path from 'node:path'; | ||
@@ -3,0 +3,0 @@ const IS_WINDOWS = process.platform === 'win32'; |
@@ -1,3 +0,3 @@ | ||
import { readFileSync } from 'fs'; | ||
import { dirname } from 'path'; | ||
import { readFileSync } from 'node:fs'; | ||
import { dirname } from 'node:path'; | ||
import { findClosestPkgJsonPath } from 'vitefu'; | ||
@@ -4,0 +4,0 @@ import { normalizePath } from 'vite'; |
import { log } from './log.js'; | ||
import { performance } from 'perf_hooks'; | ||
import { performance } from 'node:perf_hooks'; | ||
import { normalizePath } from 'vite'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,5 +0,5 @@ | ||
import fs from 'fs'; | ||
import fs from 'node:fs'; | ||
import { log } from './log.js'; | ||
import { knownSvelteConfigNames } from './load-svelte-config.js'; | ||
import path from 'path'; | ||
import path from 'node:path'; | ||
@@ -6,0 +6,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
114121
3443
5