Skip to content

Commit 63bea0d

Browse files
committed
chore: release svelte-preprocess 6
1 parent e46b53e commit 63bea0d

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

CHANGELOG.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
## [5.1.4](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.3...v5.1.4) (2024-04-16)
1+
# [6.0.0](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.4...v6.0.0) (2024-06-12)
2+
3+
### BREAKING CHANGES
24

5+
- remove TS mixed imports support, require TS 5.0 or higher
6+
- remove `preserve` option as it's unnecessary
7+
- require Svelte 4+, Node 18+
8+
- add exports map
39

410
### Bug Fixes
511

6-
* remove pnpm version restriction ([#629](https://github.com/sveltejs/svelte-preprocess/issues/629)) ([2713b82](https://github.com/sveltejs/svelte-preprocess/commit/2713b82d80cd6d40c1c12cebe31c4d25882bec13))
12+
- 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)
13+
- fix: allow TS filename to be undefined, fixes [#488](https://github.com/sveltejs/svelte-preprocess/issues/488)
14+
- fix: adjust Svelte compiler type import
15+
- fix: remove pug types and magic-string from dependencies
16+
- chore: bump peer deps, fixes [#553](https://github.com/sveltejs/svelte-preprocess/issues/553)
717

18+
## [5.1.4](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.3...v5.1.4) (2024-04-16)
819

20+
### Bug Fixes
921

10-
## [5.1.3](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.2...v5.1.3) (2023-12-18)
22+
- remove pnpm version restriction ([#629](https://github.com/sveltejs/svelte-preprocess/issues/629)) ([2713b82](https://github.com/sveltejs/svelte-preprocess/commit/2713b82d80cd6d40c1c12cebe31c4d25882bec13))
1123

24+
## [5.1.3](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.2...v5.1.3) (2023-12-18)
1225

1326
### Bug Fixes
1427

15-
* 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))
16-
17-
28+
- 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))
1829

1930
## [5.1.2](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.1...v5.1.2) (2023-12-12)
2031

docs/migration-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ In `v4`, your TypeScript code will only be transpiled into JavaScript, with no t
9595

9696
- Svelte 4 or higher is required now
9797
- Node 18 or higher is required now
98-
- 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
98+
- 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
99+
- The `preserve` option was removed as it's obsolete

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-preprocess",
3-
"version": "5.1.4",
3+
"version": "6.0.0",
44
"license": "MIT",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/modules/globalifySelector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* escaped combinators like `\~`.
77
*/
88
// TODO: maybe replace this ugly pattern with an actual selector parser? (https://github.com/leaverou/parsel, 2kb)
9-
const combinatorPattern = /(?<!\\)(?:\\\\)*([ >+~,]\s*)(?![^(]*\))(?![^[]+\]|\d)/g;
9+
const combinatorPattern =
10+
/(?<!\\)(?:\\\\)*([ >+~,]\s*)(?![^(]*\))(?![^[]+\]|\d)/g;
1011

1112
export function globalifySelector(selector: string) {
1213
const parts = selector.trim().split(combinatorPattern);

src/transformers/stylus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const transformer: Transformer<Options.Stylus> = ({
2727
// istanbul ignore next
2828
if (err) reject(err);
2929
if (style.sourcemap?.sources) {
30-
style.sourcemap.sources = style.sourcemap.sources.map((source) =>
30+
style.sourcemap.sources = style.sourcemap.sources.map((source: any) =>
3131
path.resolve(source),
3232
);
3333
}

0 commit comments

Comments
 (0)