Skip to content

Commit

Permalink
chore: release svelte-preprocess 6
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jun 12, 2024
1 parent e46b53e commit 63bea0d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
23 changes: 17 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
3 changes: 2 additions & 1 deletion docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/modules/globalifySelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/stylus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const transformer: Transformer<Options.Stylus> = ({
// 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),
);
}
Expand Down

0 comments on commit 63bea0d

Please sign in to comment.