diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e911c..2cbed7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,31 @@ -## [5.1.4](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.3...v5.1.4) (2024-04-16) +# [6.0.0](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.4...v6.0.0) (2024-06-12) + +### BREAKING CHANGES +- remove TS mixed imports support, require TS 5.0 or higher +- remove `preserve` option as it's unnecessary +- require Svelte 4+, Node 18+ +- add exports map ### Bug Fixes -* remove pnpm version restriction ([#629](https://github.com/sveltejs/svelte-preprocess/issues/629)) ([2713b82](https://github.com/sveltejs/svelte-preprocess/commit/2713b82d80cd6d40c1c12cebe31c4d25882bec13)) +- adjust globalifySelector to not split selectors with parentheses. ([#632](https://github.com/sveltejs/svelte-preprocess/issues/632)) ([c435ebd](https://github.com/sveltejs/svelte-preprocess/commit/c435ebd633b9b5d461e8256b748a9f6b28680965)), closes [#501](https://github.com/sveltejs/svelte-preprocess/issues/501) +- fix: allow TS filename to be undefined, fixes [#488](https://github.com/sveltejs/svelte-preprocess/issues/488) +- fix: adjust Svelte compiler type import +- fix: remove pug types and magic-string from dependencies +- chore: bump peer deps, fixes [#553](https://github.com/sveltejs/svelte-preprocess/issues/553) +## [5.1.4](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.3...v5.1.4) (2024-04-16) +### Bug Fixes -## [5.1.3](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.2...v5.1.3) (2023-12-18) +- remove pnpm version restriction ([#629](https://github.com/sveltejs/svelte-preprocess/issues/629)) ([2713b82](https://github.com/sveltejs/svelte-preprocess/commit/2713b82d80cd6d40c1c12cebe31c4d25882bec13)) +## [5.1.3](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.2...v5.1.3) (2023-12-18) ### Bug Fixes -* sass dependency list referencing source file in win32 ([#621](https://github.com/sveltejs/svelte-preprocess/issues/621)) ([209312f](https://github.com/sveltejs/svelte-preprocess/commit/209312fe258fc1dc5eb6f0d81937c6962ca8bafc)) - - +- sass dependency list referencing source file in win32 ([#621](https://github.com/sveltejs/svelte-preprocess/issues/621)) ([209312f](https://github.com/sveltejs/svelte-preprocess/commit/209312fe258fc1dc5eb6f0d81937c6962ca8bafc)) ## [5.1.2](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.1...v5.1.2) (2023-12-12) diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 27110fb..26f73aa 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -95,4 +95,5 @@ In `v4`, your TypeScript code will only be transpiled into JavaScript, with no t - Svelte 4 or higher is required now - Node 18 or higher is required now -- When using TypeScript, the minimum required version is now 5.0, `"verbatimModuleSyntax": true` is now required in your `tsconfig.json`, and the mixed imports transpiler was removed +- When using TypeScript, the minimum required version is now 5.0, `"verbatimModuleSyntax": true` is now required in your `tsconfig.json`, and the mixed imports transpiler (`handleMixedImports`) was removed +- The `preserve` option was removed as it's obsolete diff --git a/package.json b/package.json index 23cbbbe..9667d2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-preprocess", - "version": "5.1.4", + "version": "6.0.0", "license": "MIT", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/modules/globalifySelector.ts b/src/modules/globalifySelector.ts index a60b43b..fd7d072 100644 --- a/src/modules/globalifySelector.ts +++ b/src/modules/globalifySelector.ts @@ -6,7 +6,8 @@ * escaped combinators like `\~`. */ // TODO: maybe replace this ugly pattern with an actual selector parser? (https://github.com/leaverou/parsel, 2kb) -const combinatorPattern = /(?+~,]\s*)(?![^(]*\))(?![^[]+\]|\d)/g; +const combinatorPattern = + /(?+~,]\s*)(?![^(]*\))(?![^[]+\]|\d)/g; export function globalifySelector(selector: string) { const parts = selector.trim().split(combinatorPattern); diff --git a/src/transformers/stylus.ts b/src/transformers/stylus.ts index 15ca515..f1987cb 100644 --- a/src/transformers/stylus.ts +++ b/src/transformers/stylus.ts @@ -27,7 +27,7 @@ const transformer: Transformer = ({ // istanbul ignore next if (err) reject(err); if (style.sourcemap?.sources) { - style.sourcemap.sources = style.sourcemap.sources.map((source) => + style.sourcemap.sources = style.sourcemap.sources.map((source: any) => path.resolve(source), ); }