From 8621cb28f873e0841eef090bea03d42ef38028dd Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 11 Mar 2024 21:02:11 +0100 Subject: [PATCH 01/23] feat: Compile `.svelte.js/ts` files when using Svelte 5 --- CHANGELOG.md | 4 ++++ index.js | 44 ++++++++++++++++++++++++++++-------- package-lock.json | 2 +- package.json | 2 +- test/fixtures/file.svelte.js | 1 + test/loader.spec.js | 16 +++++++++++++ 6 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 test/fixtures/file.svelte.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aa0b6ec..04325d04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # svelte-loader changelog +## 3.2.0 + +* Compile `.svelte.js/ts` files when using Svelte 5 + ## 3.1.9 * Handle `emitCSS` to `css` option transformation correctly for Svelte 4 diff --git a/index.js b/index.js index a2f3e1da..e4270b0d 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs'); const { getOptions } = require('loader-utils'); const { buildMakeHot } = require('./lib/make-hot.js'); -const { compile, preprocess, VERSION } = require('svelte/compiler'); +const svelte = require('svelte/compiler'); function posixify(file) { return file.replace(/[/\\]/g, '/'); @@ -55,6 +55,10 @@ try { let warned = false; +function getMajor() { + return Number(svelte.VERSION.split('.')[0]) +} + module.exports = function(source, map) { this.cacheable(); @@ -70,13 +74,37 @@ module.exports = function(source, map) { const isServer = this.target === 'node' || (options.compilerOptions && options.compilerOptions.generate == 'ssr'); const isProduction = this.minimize || process.env.NODE_ENV === 'production'; - const compileOptions = { filename: this.resourcePath, - css: VERSION[0] === '3' ? !options.emitCss : (options.emitCss ? 'external' : 'injected'), + css: getMajor() === 3 ? !options.emitCss : (options.emitCss ? 'external' : 'injected'), ...options.compilerOptions }; - if (VERSION[0] === '3') { + const handleWarning = warning => this.emitWarning(new Error(warning)); + + if (getMajor() >= 5 && (this.resourcePath.endsWith('.svelte.js') || this.resourcePath.endsWith('.svelte.ts'))) { + try { + const { js, warnings } = svelte.compileModule( + source, + { filename: this.resourcePath, dev: compileOptions.dev, generate: compileOptions.generate } + ); + + warnings.forEach( + options.onwarn + ? warning => options.onwarn(warning, handleWarning) + : handleWarning + ); + + callback(null, js.code, js.map); + } catch (err) { + // wrap error to provide correct + // context when logging to console + callback(new Error(`${err.name}: ${err.toString()}`)); + } + + return; + } + + if (getMajor() === 3) { compileOptions.format = (options.compilerOptions && options.compilerOptions.format) || 'esm'; } else { if (options.compilerOptions && options.compilerOptions.format && !warned) { @@ -86,12 +114,10 @@ module.exports = function(source, map) { } } - const handleWarning = warning => this.emitWarning(new Error(warning)); - options.preprocess = options.preprocess || {}; options.preprocess.filename = compileOptions.filename; - preprocess(source, options.preprocess).then(processed => { + svelte.preprocess(source, options.preprocess).then(processed => { if (processed.dependencies && this.addDependency) { for (let dependency of processed.dependencies) { this.addDependency(dependency); @@ -100,7 +126,7 @@ module.exports = function(source, map) { if (processed.map) compileOptions.sourcemap = processed.map; - const compiled = compile(processed.toString(), compileOptions); + const compiled = svelte.compile(processed.toString(), compileOptions); let { js, css, warnings } = compiled; if (!js.map.sourcesContent) { @@ -121,7 +147,7 @@ module.exports = function(source, map) { js.code = makeHot(id, js.code, hotOptions, compiled, source, compileOptions); } - if (options.emitCss && css.code) { + if (options.emitCss && css && css.code) { const resource = posixify(compileOptions.filename); const cssPath = `${resource}.${index++}.css`; css.code += '\n/*# sourceMappingURL=' + css.map.toUrl() + '*/'; diff --git a/package-lock.json b/package-lock.json index fe84de98..bac92701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "svelte": "^3.0.0" }, "peerDependencies": { - "svelte": "^3.0.0 || ^4.0.0-next.0" + "svelte": "^3.0.0 || ^4.0.0-next.0 || ^5.0.0-next.1" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index 0fbae489..b428a26e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "svelte": "^3.0.0" }, "peerDependencies": { - "svelte": "^3.0.0 || ^4.0.0-next.0" + "svelte": "^3.0.0 || ^4.0.0-next.0 || ^5.0.0-next.1" }, "repository": { "type": "git", diff --git a/test/fixtures/file.svelte.js b/test/fixtures/file.svelte.js new file mode 100644 index 00000000..52550bbc --- /dev/null +++ b/test/fixtures/file.svelte.js @@ -0,0 +1 @@ +export const count = $state({ value: 0 }); diff --git a/test/loader.spec.js b/test/loader.spec.js index 4d8d2fbb..93c570f5 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -355,6 +355,22 @@ describe('loader', () => { ); }); }); + + // needs Svelte 5 + describe.skip('Svelte 5', () => { + it( + 'should compile .svelte.js/ts', + testLoader( + 'test/fixtures/file.svelte.js', + function(err, code, map) { + expect(err).not.to.exist; + + expect(code).not.to.contain('$state'); + }, + {} + ) + ); + }); }); function readFile(path) { From 626617d97d5da96acadbb23e9e0fe2eb0dbaf202 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 11 Mar 2024 21:02:57 +0100 Subject: [PATCH 02/23] chore: release 3.2.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bac92701..4f22ecbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte-loader", - "version": "3.1.9", + "version": "3.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte-loader", - "version": "3.1.9", + "version": "3.2.0", "license": "MIT", "dependencies": { "loader-utils": "^2.0.4", diff --git a/package.json b/package.json index b428a26e..453bcd1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-loader", - "version": "3.1.9", + "version": "3.2.0", "author": "Nico Rehwaldt ", "description": "A webpack loader for svelte", "license": "MIT", From f2a7bc1364939ba2efc51f4400e0a85360f0a123 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 11 Mar 2024 21:05:54 +0100 Subject: [PATCH 03/23] chore: lint --- index.js | 2 +- test/fixtures/file.svelte.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e4270b0d..3d2ff6a4 100644 --- a/index.js +++ b/index.js @@ -56,7 +56,7 @@ try { let warned = false; function getMajor() { - return Number(svelte.VERSION.split('.')[0]) + return Number(svelte.VERSION.split('.')[0]); } module.exports = function(source, map) { diff --git a/test/fixtures/file.svelte.js b/test/fixtures/file.svelte.js index 52550bbc..c743614c 100644 --- a/test/fixtures/file.svelte.js +++ b/test/fixtures/file.svelte.js @@ -1 +1 @@ -export const count = $state({ value: 0 }); +export const count = $state({ value: 0 }); // eslint-disable-line no-undef From c8a786f5c4d077b2839369b7aa866f3cdefbc71f Mon Sep 17 00:00:00 2001 From: non25 <19non91@gmail.com> Date: Tue, 4 Jun 2024 14:57:30 +0300 Subject: [PATCH 04/23] docs: extend default configuration for mainFields and conditionNames (#240) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85a01c5d..d925bfd4 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ Configure inside your `webpack.config.js`: svelte: path.resolve('node_modules', 'svelte/src/runtime') // Svelte 3: path.resolve('node_modules', 'svelte') }, extensions: ['.mjs', '.js', '.svelte'], - mainFields: ['svelte', 'browser', 'module', 'main'], - conditionNames: ['svelte', 'browser', 'import'] + mainFields: ['svelte', 'browser', '...'], + conditionNames: ['svelte', 'browser', '...'], }, module: { rules: [ From a90bcb44c3d4d57473fc4fbe587bce0bb9adcb93 Mon Sep 17 00:00:00 2001 From: William Bain Date: Tue, 4 Jun 2024 07:58:34 -0400 Subject: [PATCH 05/23] fix: handle disabled sourcemaps (#236) --- index.js | 6 +++-- test/loader.spec.js | 56 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3d2ff6a4..ddbdc566 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ module.exports = function(source, map) { const compiled = svelte.compile(processed.toString(), compileOptions); let { js, css, warnings } = compiled; - if (!js.map.sourcesContent) { + if (js.map && !js.map.sourcesContent) { js.map.sourcesContent = [source]; js.map.sources = [compileOptions.filename]; } @@ -150,7 +150,9 @@ module.exports = function(source, map) { if (options.emitCss && css && css.code) { const resource = posixify(compileOptions.filename); const cssPath = `${resource}.${index++}.css`; - css.code += '\n/*# sourceMappingURL=' + css.map.toUrl() + '*/'; + if (css.map) { + css.code += '\n/*# sourceMappingURL=' + css.map.toUrl() + '*/'; + } js.code += `\nimport '${cssPath}!=!svelte-loader?cssPath=${cssPath}!${resource}'\n;`; virtualModules.set(cssPath, css.code); } diff --git a/test/loader.spec.js b/test/loader.spec.js index 93c570f5..5dd62055 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -164,6 +164,34 @@ describe('loader', () => { { compilerOptions: { css: false } } ) ); + + it( + 'should configure css with dev sourcemaps', + testLoader( + 'test/fixtures/css.html', + function(err, code, map) { + expect(err).not.to.exist; + expect(code).to.contain('function add_css(target)'); + expect(code).to.contain('/*# sourceMappingURL='); + expect(map).to.exist; + }, + { compilerOptions: { dev: true, enableSourcemap: true } } + ) + ); + + it( + 'should configure css without dev sourcemaps', + testLoader( + 'test/fixtures/css.html', + function(err, code, map) { + expect(err).not.to.exist; + expect(code).to.contain('function add_css(target)'); + expect(code).not.to.contain('/*# sourceMappingURL='); + expect(map).to.exist; + }, + { compilerOptions: { dev: true, enableSourcemap: { css: false, js: true } } } + ) + ); }); describe('sveltePath', () => { @@ -234,6 +262,19 @@ describe('loader', () => { { emitCss: true } ) ); + + it( + 'should configure emitCss=true without css sourcemaps', + testLoader( + 'test/fixtures/css.html', + function(err, code, map) { + expect(err).not.to.exist; + + expect(code).to.match(/!=!svelte-loader\?cssPath=/); + }, + { emitCss: true, compilerOptions: { enableSourcemap: { css: false, js: true } } } + ) + ); }); describe('preprocess', () => { @@ -354,6 +395,21 @@ describe('loader', () => { ) ); }); + + describe('compilerOptions', () => { + it( + 'should configure enableSourcemap=false', + testLoader( + 'test/fixtures/good.html', + function(err, code, map) { + expect(err).not.to.exist; + expect(code).to.exist; + expect(map).not.to.exist; + }, + { compilerOptions: { enableSourcemap: false } } + ), + ); + }); }); // needs Svelte 5 From 1a5e3e4d428b35547a0b7d80d3b7e76987e8ac9b Mon Sep 17 00:00:00 2001 From: jaikme Date: Tue, 4 Jun 2024 09:04:14 -0300 Subject: [PATCH 06/23] fix: handle esm config when checking for conditionNames (#231) Fix loading the default module exports when config is ESM to suppress the warning of checking "resolve.conditionNames". --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ddbdc566..32e75e74 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,10 @@ function posixify(file) { return file.replace(/[/\\]/g, '/'); } +function interopEsmDefault(mod) { + return mod && mod.__esModule && mod.default ? mod.default : mod; +} + const virtualModules = new Map(); let index = 0; @@ -26,7 +30,7 @@ for (let i = 0; i < process.argv.length; i++) { try { const configPath = path.resolve(process.cwd(), configFile); - const config = require(configPath); + const config = interopEsmDefault(require(configPath)); let found = false; if (Array.isArray(config)) { found = config.some(check); From c5ecc7b9f9f9768eb9ceed4c8dfa0c15569af65d Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 4 Jun 2024 14:30:22 +0200 Subject: [PATCH 07/23] docs: update test patterns For Svelte 5 .svelte.js and .svelte.ts files need to be checked, too --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d925bfd4..8deeb351 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,18 @@ Configure inside your `webpack.config.js`: module: { rules: [ ... + // This is only needed if you use Svelte 5+ with TypeScript { - test: /\.(html|svelte)$/, + test: /\.svelte\.ts$/, + use: ['ts-loader', 'svelte-loader'] + }, + { + // Svelte 5+: + test: /\.(svelte|svelte\.js)$/, + // Svelte 3 or 4: + // test: /\.svelte$/, + // In case you write Svelte in HTML (not recommended since Svelte 3): + // test: /\.(html|svelte)$/, use: 'svelte-loader' }, { @@ -76,7 +86,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); rules: [ ... { - test: /\.(html|svelte)$/, + test: /\.(svelte|svelte\.js)$/, use: { loader: 'svelte-loader', options: { @@ -219,7 +229,7 @@ module.exports = { rules: [ ... { - test: /\.(html|svelte)$/, + test: /\.(svelte|svelte\.js)$/, use: { loader: 'svelte-loader', options: { @@ -311,7 +321,7 @@ module.exports = { rules: [ ... { - test: /\.(html|svelte)$/, + test: /\.(svelte|svelte\.js)$/, use: { loader: 'svelte-loader', options: { From d42a6053207ffbe3f8889775d50fd4796378013f Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 4 Jun 2024 14:51:07 +0200 Subject: [PATCH 08/23] fix: disable HMR for Svelte 5 svelte-hmr doesn't support Svelte 5 --- README.md | 2 ++ index.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8deeb351..2da46ca4 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,8 @@ Now you can use other languages inside the script and style tags. Make sure to i ### Hot Reload +> Hot Module Reloading is currently not supported for Svelte 5+ + This loader supports component-level HMR via the community supported [svelte-hmr](https://github.com/rixo/svelte-hmr) package. This package serves as a testbed and early access for Svelte HMR, while we figure out how to best include HMR support in the compiler itself (which is tricky to do without unfairly favoring any particular dev tooling). Feedback, suggestion, or help to move HMR forward is welcomed at [svelte-hmr](https://github.com/rixo/svelte-hmr/issues) (for now). Configure inside your `webpack.config.js`: diff --git a/index.js b/index.js index 32e75e74..2a6ab323 100644 --- a/index.js +++ b/index.js @@ -144,7 +144,8 @@ module.exports = function(source, map) { : handleWarning ); - if (options.hotReload && !isProduction && !isServer) { + // svelte-hmr has no Svelte 5 support + if (options.hotReload && !isProduction && !isServer && getMajor() < 5) { const hotOptions = { ...options.hotOptions }; const makeHot = buildMakeHot(hotOptions); const id = JSON.stringify(path.relative(process.cwd(), compileOptions.filename)); From bdb1e053d098a918729e89ad07fe52ba81d160b0 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 4 Jun 2024 15:27:16 +0200 Subject: [PATCH 09/23] chore: adjust tests for Svelte 5 Also bump Svelte to version 4 inside this project --- index.js | 6 +- package-lock.json | 383 +++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- test/loader.spec.js | 96 ++++++++--- 4 files changed, 454 insertions(+), 33 deletions(-) diff --git a/index.js b/index.js index 2a6ab323..fa123644 100644 --- a/index.js +++ b/index.js @@ -172,6 +172,10 @@ module.exports = function(source, map) { }).catch(err => { // wrap error to provide correct // context when logging to console - callback(new Error(`${err.name}: ${err.toString()}`)); + let err_str = err.toString(); + if (getMajor() < 5 || !err_str.startsWith('CompileError:')) { + err_str = `${err.name}: ${err_str}` + } + callback(new Error(err_str)); }); }; diff --git a/package-lock.json b/package-lock.json index 4f22ecbc..d37fa62f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,12 +20,24 @@ "mocha": "^10.2.0", "sinon": "^9.2.3", "sinon-chai": "^3.5.0", - "svelte": "^3.0.0" + "svelte": "^4.0.0" }, "peerDependencies": { "svelte": "^3.0.0 || ^4.0.0-next.0 || ^5.0.0-next.1" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -87,6 +99,49 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@sinonjs/commons": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", @@ -122,6 +177,11 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -211,6 +271,14 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -229,6 +297,14 @@ "node": ">=8" } }, + "node_modules/axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -423,6 +499,29 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, + "node_modules/code-red/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -458,6 +557,18 @@ "node": ">= 8" } }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -493,6 +604,14 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "engines": { + "node": ">=6" + } + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -761,6 +880,14 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -1075,6 +1202,14 @@ "node": ">=8" } }, + "node_modules/is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1173,6 +1308,11 @@ "node": ">=8.9.0" } }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1228,6 +1368,19 @@ "node": ">=10" } }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1529,6 +1682,16 @@ "node": "*" } }, + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1813,6 +1976,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1870,11 +2041,27 @@ } }, "node_modules/svelte": { - "version": "3.59.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.1.tgz", - "integrity": "sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==", + "version": "4.2.17", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.17.tgz", + "integrity": "sha512-N7m1YnoXtRf5wya5Gyx3TWuTddI4nAyayyIWFojiWV5IayDYNV5i2mRp/7qNGol4DtxEYxljmrbgp1HM6hUbmQ==", + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/estree": "^1.0.1", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.4", + "periscopic": "^3.1.0" + }, "engines": { - "node": ">= 8" + "node": ">=16" } }, "node_modules/svelte-dev-helper": { @@ -1890,6 +2077,17 @@ "svelte": ">=3.19.0" } }, + "node_modules/svelte/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/table": { "version": "6.0.7", "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", @@ -2171,6 +2369,15 @@ } }, "dependencies": { + "@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, "@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -2228,6 +2435,40 @@ "strip-json-comments": "^3.1.1" } }, + "@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "requires": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==" + }, + "@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==" + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@sinonjs/commons": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", @@ -2263,6 +2504,11 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -2328,6 +2574,14 @@ "sprintf-js": "~1.0.2" } }, + "aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "requires": { + "dequal": "^2.0.3" + } + }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2340,6 +2594,14 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", + "requires": { + "dequal": "^2.0.3" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2486,6 +2748,25 @@ "wrap-ansi": "^7.0.0" } }, + "code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + }, + "dependencies": { + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" + } + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2518,6 +2799,15 @@ "which": "^2.0.1" } }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2542,6 +2832,11 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -2742,6 +3037,14 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, + "estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "requires": { + "@types/estree": "^1.0.0" + } + }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2971,6 +3274,14 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "requires": { + "@types/estree": "*" + } + }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -3048,6 +3359,11 @@ "json5": "^2.1.2" } }, + "locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3088,6 +3404,19 @@ "yallist": "^4.0.0" } }, + "magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3314,6 +3643,16 @@ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, + "periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -3509,6 +3848,11 @@ } } }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==" + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -3551,9 +3895,32 @@ } }, "svelte": { - "version": "3.59.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.1.tgz", - "integrity": "sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==" + "version": "4.2.17", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.17.tgz", + "integrity": "sha512-N7m1YnoXtRf5wya5Gyx3TWuTddI4nAyayyIWFojiWV5IayDYNV5i2mRp/7qNGol4DtxEYxljmrbgp1HM6hUbmQ==", + "requires": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/estree": "^1.0.1", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.4", + "periscopic": "^3.1.0" + }, + "dependencies": { + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" + } + } }, "svelte-dev-helper": { "version": "1.1.9", diff --git a/package.json b/package.json index 453bcd1a..1d3d0cf0 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "mocha": "^10.2.0", "sinon": "^9.2.3", "sinon-chai": "^3.5.0", - "svelte": "^3.0.0" + "svelte": "^4.0.0" }, "peerDependencies": { "svelte": "^3.0.0 || ^4.0.0-next.0 || ^5.0.0-next.1" diff --git a/test/loader.spec.js b/test/loader.spec.js index 5dd62055..fdb9b982 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -4,6 +4,9 @@ const sinonChai = require('sinon-chai'); const { spy } = require('sinon'); const { readFileSync } = require('fs'); const loader = require('../'); +const { VERSION } = require('svelte/compiler'); + +const isSvelte5Plus = Number(VERSION.split('.')[0]) >= 5; chai.use(sinonChai); const { expect } = chai; @@ -77,14 +80,21 @@ describe('loader', () => { err, code, map, - context ) { expect(err).to.exist; - expect(err.message).to.eql(d` - ParseError: Unexpected block closing tag (1:23) - 1:

Count: {count}

{/if} - ^`); + if (isSvelte5Plus) { + expect(err.message).to.eql(d` + CompileError: Unexpected block closing tag + (block_unexpected_close) + test/fixtures/parse-error.html1:22 + `); + } else { + expect(err.message).to.eql(d` + ParseError: Unexpected block closing tag (1:23) + 1:

Count: {count}

{/if} + ^`); + } expect(code).not.to.exist; expect(map).not.to.exist; @@ -97,17 +107,24 @@ describe('loader', () => { err, code, map, - context ) { expect(err).to.exist; - expect(err.message.trim().replace(/\r/g, '')).to.eql(d` - ValidationError: A component cannot have a default export (2:1) - 1: - 4:`); + if (isSvelte5Plus) { + expect(err.message.trim().replace(/\r/g, '')).to.eql(d` + CompileError: A component cannot have a default export + (module_illegal_default_export) + test/fixtures/validation-error.html2:1 + `); + } else { + expect(err.message.trim().replace(/\r/g, '')).to.eql(d` + ValidationError: A component cannot have a default export (2:1) + 1: + 4:`); + } expect(code).not.to.exist; expect(map).not.to.exist; @@ -149,7 +166,11 @@ describe('loader', () => { 'should configure css (default)', testLoader('test/fixtures/css.html', function(err, code, map) { expect(err).not.to.exist; - expect(code).to.contain('function add_css(target)'); + if (isSvelte5Plus) { + expect(code).to.contain('$.append_styles'); + } else { + expect(code).to.contain('function add_css(target)'); + } }) ); @@ -159,9 +180,13 @@ describe('loader', () => { 'test/fixtures/css.html', function(err, code, map) { expect(err).not.to.exist; - expect(code).not.to.contain('function add_css(target)'); + if (isSvelte5Plus) { + expect(code).not.to.contain('$.append_styles'); + } else { + expect(code).not.to.contain('function add_css(target)'); + } }, - { compilerOptions: { css: false } } + { compilerOptions: { css: 'external' } } ) ); @@ -171,7 +196,11 @@ describe('loader', () => { 'test/fixtures/css.html', function(err, code, map) { expect(err).not.to.exist; - expect(code).to.contain('function add_css(target)'); + if (isSvelte5Plus) { + expect(code).to.contain('$.append_styles'); + } else { + expect(code).to.contain('function add_css(target)'); + } expect(code).to.contain('/*# sourceMappingURL='); expect(map).to.exist; }, @@ -184,6 +213,9 @@ describe('loader', () => { testLoader( 'test/fixtures/css.html', function(err, code, map) { + // This compiler option is removed in Svelte 5+, sourcemaps are always generated + if (isSvelte5Plus) return; + expect(err).not.to.exist; expect(code).to.contain('function add_css(target)'); expect(code).not.to.contain('/*# sourceMappingURL='); @@ -195,6 +227,9 @@ describe('loader', () => { }); describe('sveltePath', () => { + // This option is removed in Svelte 5+ + if (isSvelte5Plus) return; + it( 'should configure sveltePath', testLoader( @@ -228,10 +263,13 @@ describe('loader', () => { 'test/fixtures/good.html', function(err, code, map) { expect(err).not.to.exist; - - expect(code).to.contain('create_ssr_component'); + if (isSvelte5Plus) { + expect(code).to.contain('$$payload.out'); + } else { + expect(code).to.contain('create_ssr_component'); + } }, - { compilerOptions: { generate: 'ssr' } } + { compilerOptions: { generate: isSvelte5Plus ? 'server' : 'ssr' } } ) ); }); @@ -284,7 +322,12 @@ describe('loader', () => { (err, code, map) => { expect(err).not.to.exist; expect(code).to.exist; - expect(code).to.contain('{width:50px;height:50px}'); + if (isSvelte5Plus) { + expect(code).to.contain('width: 50px;'); + expect(code).to.contain('height: 50px;'); + } else { + expect(code).to.contain('{width:50px;height:50px}'); + } expect(map).to.exist; }, { @@ -320,6 +363,9 @@ describe('loader', () => { }); describe('hotReload', () => { + // Svelte 5+ doesn't support hot reload currently + if (isSvelte5Plus) return; + it( 'should configure hotReload=false (default)', testLoader( @@ -402,6 +448,9 @@ describe('loader', () => { testLoader( 'test/fixtures/good.html', function(err, code, map) { + // The compiler option is removed in Svelte 5+, sourcemaps are always generated + if (isSvelte5Plus) return; + expect(err).not.to.exist; expect(code).to.exist; expect(map).not.to.exist; @@ -412,8 +461,9 @@ describe('loader', () => { }); }); - // needs Svelte 5 - describe.skip('Svelte 5', () => { + describe('Svelte 5', () => { + if (!isSvelte5Plus) return; + it( 'should compile .svelte.js/ts', testLoader( From 495600bb605341a4cc9c8af39985895e35edc658 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 4 Jun 2024 15:30:32 +0200 Subject: [PATCH 10/23] chore: release 3.2.1 --- CHANGELOG.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04325d04..6eaf0e54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # svelte-loader changelog +## 3.2.1 + +* Handle sourcemaps being falsy +* Handle ESM config when checking for `conditionNames` + ## 3.2.0 * Compile `.svelte.js/ts` files when using Svelte 5 diff --git a/package-lock.json b/package-lock.json index d37fa62f..2cd10481 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte-loader", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte-loader", - "version": "3.2.0", + "version": "3.2.1", "license": "MIT", "dependencies": { "loader-utils": "^2.0.4", diff --git a/package.json b/package.json index 1d3d0cf0..02c52e52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-loader", - "version": "3.2.0", + "version": "3.2.1", "author": "Nico Rehwaldt ", "description": "A webpack loader for svelte", "license": "MIT", From 562db6a1c5a410af71e98c8ae7850b50a8859643 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 6 Jun 2024 10:55:33 +0200 Subject: [PATCH 11/23] fix: compile .svelte.xxx.js/ts modules in Svelte 5 https://github.com/sveltejs/svelte/issues/11536 --- CHANGELOG.md | 4 ++++ index.js | 4 +++- package-lock.json | 4 ++-- package.json | 2 +- test/fixtures/file.svelte.foo.ts | 2 ++ test/loader.spec.js | 15 ++++++++++++++- 6 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/file.svelte.foo.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eaf0e54..1ea861c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # svelte-loader changelog +## 3.2.2 + +* Svelte 5: Also compile `.svelte.xxx.js/ts` files + ## 3.2.1 * Handle sourcemaps being falsy diff --git a/index.js b/index.js index fa123644..99101e7d 100644 --- a/index.js +++ b/index.js @@ -63,6 +63,8 @@ function getMajor() { return Number(svelte.VERSION.split('.')[0]); } +const svelte_module_regex = /\.svelte(\.[^.]+)*\.(js|ts)$/ + module.exports = function(source, map) { this.cacheable(); @@ -85,7 +87,7 @@ module.exports = function(source, map) { }; const handleWarning = warning => this.emitWarning(new Error(warning)); - if (getMajor() >= 5 && (this.resourcePath.endsWith('.svelte.js') || this.resourcePath.endsWith('.svelte.ts'))) { + if (getMajor() >= 5 && svelte_module_regex.test(this.resourcePath)) { try { const { js, warnings } = svelte.compileModule( source, diff --git a/package-lock.json b/package-lock.json index 2cd10481..8a4fa0c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte-loader", - "version": "3.2.1", + "version": "3.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte-loader", - "version": "3.2.1", + "version": "3.2.2", "license": "MIT", "dependencies": { "loader-utils": "^2.0.4", diff --git a/package.json b/package.json index 02c52e52..d2366549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-loader", - "version": "3.2.1", + "version": "3.2.2", "author": "Nico Rehwaldt ", "description": "A webpack loader for svelte", "license": "MIT", diff --git a/test/fixtures/file.svelte.foo.ts b/test/fixtures/file.svelte.foo.ts new file mode 100644 index 00000000..b1ac3c1d --- /dev/null +++ b/test/fixtures/file.svelte.foo.ts @@ -0,0 +1,2 @@ +// @ts-nocheck +export const count = $state({ value: 0 }); // eslint-disable-line no-undef diff --git a/test/loader.spec.js b/test/loader.spec.js index fdb9b982..9d302a46 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -465,7 +465,7 @@ describe('loader', () => { if (!isSvelte5Plus) return; it( - 'should compile .svelte.js/ts', + 'should compile .svelte.js', testLoader( 'test/fixtures/file.svelte.js', function(err, code, map) { @@ -476,6 +476,19 @@ describe('loader', () => { {} ) ); + + it( + 'should compile .svelte.foo.ts', + testLoader( + 'test/fixtures/file.svelte.foo.ts', + function(err, code, map) { + expect(err).not.to.exist; + + expect(code).not.to.contain('$state'); + }, + {} + ) + ); }); }); From 8094d0d97f5665af18e1332df921b98855945f1e Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 6 Jun 2024 11:05:32 +0200 Subject: [PATCH 12/23] fix: Don't compile `.svelte/.../.xxx.js/ts` files in Svelte 5 --- CHANGELOG.md | 4 ++++ index.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ea861c7..6fd96943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # svelte-loader changelog +## 3.2.3 + +* Svelte 5: Don't compile `.svelte/.../.xxx.js/ts` files + ## 3.2.2 * Svelte 5: Also compile `.svelte.xxx.js/ts` files diff --git a/index.js b/index.js index 99101e7d..20822645 100644 --- a/index.js +++ b/index.js @@ -63,7 +63,7 @@ function getMajor() { return Number(svelte.VERSION.split('.')[0]); } -const svelte_module_regex = /\.svelte(\.[^.]+)*\.(js|ts)$/ +const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/ module.exports = function(source, map) { this.cacheable(); diff --git a/package-lock.json b/package-lock.json index 8a4fa0c6..cfe0205c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte-loader", - "version": "3.2.2", + "version": "3.2.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte-loader", - "version": "3.2.2", + "version": "3.2.3", "license": "MIT", "dependencies": { "loader-utils": "^2.0.4", diff --git a/package.json b/package.json index d2366549..3dc5701d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-loader", - "version": "3.2.2", + "version": "3.2.3", "author": "Nico Rehwaldt ", "description": "A webpack loader for svelte", "license": "MIT", From 50df9401f9d78f0acfebb9ed1df9c96af9091833 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 6 Jun 2024 11:10:27 +0200 Subject: [PATCH 13/23] chore: fix lint, ensure it runs before publishing --- index.js | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 20822645..536a8449 100644 --- a/index.js +++ b/index.js @@ -63,7 +63,7 @@ function getMajor() { return Number(svelte.VERSION.split('.')[0]); } -const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/ +const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/; module.exports = function(source, map) { this.cacheable(); @@ -176,7 +176,7 @@ module.exports = function(source, map) { // context when logging to console let err_str = err.toString(); if (getMajor() < 5 || !err_str.startsWith('CompileError:')) { - err_str = `${err.name}: ${err_str}` + err_str = `${err.name}: ${err_str}`; } callback(new Error(err_str)); }); diff --git a/package.json b/package.json index 3dc5701d..dcf6e683 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "scripts": { "all": "npm run lint && npm run test", "test": "mocha --harmony --full-trace --check-leaks", - "lint": "eslint index.js lib/*.js test/**/*.js" + "lint": "eslint index.js lib/*.js test/**/*.js", + "prepublishOnly": "npm run all" }, "keywords": [ "svelte", From 87434ddc4b369d9da7cba4898596651911b60454 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 19 Aug 2024 10:49:38 +0200 Subject: [PATCH 14/23] chore: fix tests when running in Svelte 5 mode --- test/loader.spec.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/loader.spec.js b/test/loader.spec.js index 9d302a46..69eff7e4 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -85,10 +85,10 @@ describe('loader', () => { if (isSvelte5Plus) { expect(err.message).to.eql(d` - CompileError: Unexpected block closing tag - (block_unexpected_close) - test/fixtures/parse-error.html1:22 - `); + CompileError: block_unexpected_close: Unexpected block closing tag + test/fixtures/parse-error.html:1:22 + 1:

Count: {count}

{/if} + ^`); } else { expect(err.message).to.eql(d` ParseError: Unexpected block closing tag (1:23) @@ -112,10 +112,13 @@ describe('loader', () => { if (isSvelte5Plus) { expect(err.message.trim().replace(/\r/g, '')).to.eql(d` - CompileError: A component cannot have a default export - (module_illegal_default_export) - test/fixtures/validation-error.html2:1 - `); + CompileError: module_illegal_default_export: A component cannot have a default export + test/fixtures/validation-error.html:2:1 + 1: + 4:`); } else { expect(err.message.trim().replace(/\r/g, '')).to.eql(d` ValidationError: A component cannot have a default export (2:1) From 5fdc8b519547212f4c9ebe84fd58eb5e11d8a12b Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Wed, 9 Oct 2024 23:11:35 +0200 Subject: [PATCH 15/23] docs: fix TS config for Svelte 5 - ts-loader needs to come after svelte-loader, as webpack runs them in backwards order - loader config for `.ts` files should exclude `.svelte.ts` file - mention `tsconfig.json` target config to not downlevel for example class features which would result in a weird error ("$state not allowed here") closes #241 --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2da46ca4..64f75f8f 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,16 @@ Configure inside your `webpack.config.js`: module: { rules: [ ... - // This is only needed if you use Svelte 5+ with TypeScript + // The following two loader entries are only needed if you use Svelte 5+ with TypeScript. + // Also make sure your tsconfig.json includes `"target": "ESNext"` in order to not downlevel syntax { test: /\.svelte\.ts$/, - use: ['ts-loader', 'svelte-loader'] + use: [ "svelte-loader", "ts-loader"], + }, + // This is the config for other .ts files - the regex makes sure to not process .svelte.ts files twice + { + test: /(? Date: Wed, 9 Oct 2024 23:13:17 +0200 Subject: [PATCH 16/23] fix: don't call `callback` twice, masking potential errors related to #238 --- CHANGELOG.md | 4 ++++ index.js | 12 ++++++++---- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fd96943..385e4e65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # svelte-loader changelog +## 3.2.4 + +* Don't call `callback` twice, masking potential errors + ## 3.2.3 * Svelte 5: Don't compile `.svelte/.../.xxx.js/ts` files diff --git a/index.js b/index.js index 536a8449..79bc1117 100644 --- a/index.js +++ b/index.js @@ -88,25 +88,29 @@ module.exports = function(source, map) { const handleWarning = warning => this.emitWarning(new Error(warning)); if (getMajor() >= 5 && svelte_module_regex.test(this.resourcePath)) { + let js, warnings; + try { - const { js, warnings } = svelte.compileModule( + ({ js, warnings } = svelte.compileModule( source, { filename: this.resourcePath, dev: compileOptions.dev, generate: compileOptions.generate } - ); + )); warnings.forEach( options.onwarn ? warning => options.onwarn(warning, handleWarning) : handleWarning ); - - callback(null, js.code, js.map); } catch (err) { // wrap error to provide correct // context when logging to console callback(new Error(`${err.name}: ${err.toString()}`)); } + // outside try-catch - if this fails and we catch it, + // calling callback again will mask the error with a "already called" error + callback(null, js.code, js.map); + return; } diff --git a/package-lock.json b/package-lock.json index cfe0205c..31bb3dfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte-loader", - "version": "3.2.3", + "version": "3.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte-loader", - "version": "3.2.3", + "version": "3.2.4", "license": "MIT", "dependencies": { "loader-utils": "^2.0.4", diff --git a/package.json b/package.json index dcf6e683..e719d374 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-loader", - "version": "3.2.3", + "version": "3.2.4", "author": "Nico Rehwaldt ", "description": "A webpack loader for svelte", "license": "MIT", From 8dd3aa1a2614ed570c5b0d4cefce373434c9bc26 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Wed, 9 Oct 2024 23:17:19 +0200 Subject: [PATCH 17/23] chore: fix CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e46780fe..e8238138 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,13 +5,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: ["14", "16", "18"] + node-version: ["18", "20", "22"] os: [ubuntu-latest, windows-latest] name: Test on Node v${{ matrix.node-version }} on ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: npm From cb01b6a67173e75d1ec8cd95a0afc822454c44fc Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 10 Oct 2024 09:41:08 +0200 Subject: [PATCH 18/23] docs: clarify tsconfig --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64f75f8f..7c2aab01 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Configure inside your `webpack.config.js`: rules: [ ... // The following two loader entries are only needed if you use Svelte 5+ with TypeScript. - // Also make sure your tsconfig.json includes `"target": "ESNext"` in order to not downlevel syntax + // Also make sure your tsconfig.json includes `"useDefineForClassFields": true` or "target" is at least "ES2022"` in order to not downlevel class syntax { test: /\.svelte\.ts$/, use: [ "svelte-loader", "ts-loader"], From 412dff0552acfbe1cb05629e67089a83cffe262e Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 4 Nov 2024 10:20:55 +0100 Subject: [PATCH 19/23] chore: fix test for Svelte 5 --- test/loader.spec.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/loader.spec.js b/test/loader.spec.js index 69eff7e4..88b6ad80 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -325,12 +325,7 @@ describe('loader', () => { (err, code, map) => { expect(err).not.to.exist; expect(code).to.exist; - if (isSvelte5Plus) { - expect(code).to.contain('width: 50px;'); - expect(code).to.contain('height: 50px;'); - } else { - expect(code).to.contain('{width:50px;height:50px}'); - } + expect(code).to.contain('{width:50px;height:50px'); expect(map).to.exist; }, { From 64f3c4982726a6819eadae1fbcc03b6426a98ca3 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 10 Jan 2025 11:39:07 +0100 Subject: [PATCH 20/23] docs: update ts-loader config should use transpileOnly, svelte-check should be used for type checking --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c2aab01..828bc367 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,15 @@ Configure inside your `webpack.config.js`: // Also make sure your tsconfig.json includes `"useDefineForClassFields": true` or "target" is at least "ES2022"` in order to not downlevel class syntax { test: /\.svelte\.ts$/, - use: [ "svelte-loader", "ts-loader"], + use: [ "svelte-loader", { loader: "ts-loader", options: { transpileOnly: true } }], }, // This is the config for other .ts files - the regex makes sure to not process .svelte.ts files twice { test: /(? Date: Wed, 23 Apr 2025 07:47:56 -0700 Subject: [PATCH 21/23] Bump word-wrap from 1.2.3 to 1.2.4 (#235) Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31bb3dfb..02caff58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2204,9 +2204,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4026,9 +4026,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "workerpool": { From c27716f55b024615b5825dc54fd4051dfc077582 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 23 Apr 2025 07:52:51 -0700 Subject: [PATCH 22/23] chore: run "npm audit fix" (#249) --- package-lock.json | 416 ++++++++++++++++++++++------------------------ 1 file changed, 198 insertions(+), 218 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02caff58..290cc473 100644 --- a/package-lock.json +++ b/package-lock.json @@ -220,10 +220,11 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -339,12 +340,13 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -544,10 +546,11 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -570,12 +573,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -928,10 +932,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1019,10 +1024,11 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -1189,6 +1195,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1356,18 +1363,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/magic-string": { "version": "0.30.10", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", @@ -1394,32 +1389,32 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -1427,10 +1422,6 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/argparse": { @@ -1444,15 +1435,17 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -1469,6 +1462,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1491,10 +1505,11 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1502,12 +1517,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -1524,22 +1533,11 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -1665,10 +1663,11 @@ } }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dev": true, + "license": "MIT", "dependencies": { "isarray": "0.0.1" } @@ -1742,6 +1741,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -1830,16 +1830,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1848,10 +1847,11 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -2041,9 +2041,10 @@ } }, "node_modules/svelte": { - "version": "4.2.17", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.17.tgz", - "integrity": "sha512-N7m1YnoXtRf5wya5Gyx3TWuTddI4nAyayyIWFojiWV5IayDYNV5i2mRp/7qNGol4DtxEYxljmrbgp1HM6hUbmQ==", + "version": "4.2.19", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", + "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -2136,6 +2137,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2213,10 +2215,11 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", @@ -2283,12 +2286,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2308,10 +2305,11 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -2535,9 +2533,9 @@ } }, "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-regex": { @@ -2630,12 +2628,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -2789,9 +2787,9 @@ "dev": true }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -2809,12 +2807,12 @@ } }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.3" } }, "deep-eql": { @@ -3079,9 +3077,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -3145,9 +3143,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true }, "glob": { @@ -3395,15 +3393,6 @@ "is-unicode-supported": "^0.1.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "magic-string": { "version": "0.30.10", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", @@ -3427,32 +3416,31 @@ } }, "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", "dev": true, "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "dependencies": { "argparse": { @@ -3471,9 +3459,9 @@ } }, "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, "escape-string-regexp": { @@ -3482,6 +3470,19 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3498,20 +3499,14 @@ } }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" } }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3524,15 +3519,9 @@ } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "natural-compare": { @@ -3629,9 +3618,9 @@ "dev": true }, "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dev": true, "requires": { "isarray": "0.0.1" @@ -3741,18 +3730,15 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -3895,9 +3881,9 @@ } }, "svelte": { - "version": "4.2.17", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.17.tgz", - "integrity": "sha512-N7m1YnoXtRf5wya5Gyx3TWuTddI4nAyayyIWFojiWV5IayDYNV5i2mRp/7qNGol4DtxEYxljmrbgp1HM6hUbmQ==", + "version": "4.2.19", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", + "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", "requires": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -4032,9 +4018,9 @@ "dev": true }, "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { @@ -4086,12 +4072,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4108,9 +4088,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yargs-unparser": { From 8c405b97194e449c06451d4ed0b39f03ed2c7465 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 17 Jul 2025 11:49:05 +0200 Subject: [PATCH 23/23] chore: make tests passing when running with latest Svelte 5 --- test/loader.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/loader.spec.js b/test/loader.spec.js index 88b6ad80..278f13f7 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -50,7 +50,8 @@ describe('loader', () => { addDependency: dependencySpy, resourcePath: fileName, version, - query + query, + emitWarning: () => {} }, fileContents, null @@ -86,6 +87,7 @@ describe('loader', () => { if (isSvelte5Plus) { expect(err.message).to.eql(d` CompileError: block_unexpected_close: Unexpected block closing tag + https://svelte.dev/e/block_unexpected_close test/fixtures/parse-error.html:1:22 1:

Count: {count}

{/if} ^`); @@ -113,6 +115,7 @@ describe('loader', () => { if (isSvelte5Plus) { expect(err.message.trim().replace(/\r/g, '')).to.eql(d` CompileError: module_illegal_default_export: A component cannot have a default export + https://svelte.dev/e/module_illegal_default_export test/fixtures/validation-error.html:2:1 1: