Skip to content

Commit 5fedf0f

Browse files
committed
chore: update jest from v29 to v30
1 parent a3e0e6d commit 5fedf0f

File tree

8 files changed

+5482
-4589
lines changed

8 files changed

+5482
-4589
lines changed

package-lock.json

Lines changed: 5216 additions & 4541 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"eslint-config-prettier": "^9.1.0",
105105
"eslint-plugin-import": "^2.29.1",
106106
"husky": "^9.1.4",
107-
"jest": "^29.7.0",
107+
"jest": "^30.0.0",
108108
"lightningcss": "^1.25.1",
109109
"lint-staged": "^15.2.8",
110110
"memfs": "^4.11.1",

test/__snapshots__/CssMinimizerPlugin.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ warning http://example.com/www/js/one.css:1:1]
5555
exports[`CssMinimizerPlugin should build error: error 1`] = `
5656
[
5757
"Error: error.css from Css Minimizer plugin
58-
/error.css:1:1: Unknown word [error.css:1,1]",
58+
/error.css:1:1: Unknown word null [error.css:1,1]",
5959
]
6060
`;
6161

test/__snapshots__/minify-option.test.js.snap

Lines changed: 188 additions & 23 deletions
Large diffs are not rendered by default.

test/__snapshots__/sourceMap-option.test.js.snap

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ error-plugin: /dist/entry2.css:10:3: Postcss error [webpack://./sourcemap/foo.cs
99
]
1010
`;
1111

12-
exports[`when applied with "sourceMap" option should work and emit warning on valid sourcemap and minimizer error: warnings 1`] = `[]`;
12+
exports[`when applied with "sourceMap" option should work and emit warning on valid sourcemap and minimizer error: warnings 1`] = `
13+
[
14+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
15+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
16+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
17+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
18+
]
19+
`;
1320

1421
exports[`when applied with "sourceMap" option should work and emit warnings on broken sourcemaps: assets 1`] = `
1522
{
@@ -39,6 +46,10 @@ exports[`when applied with "sourceMap" option should work and emit warnings on b
3946
exports[`when applied with "sourceMap" option should work and emit warnings on broken sourcemaps: warnings 1`] = `
4047
[
4148
"Error: broken-source-map.css contains invalid source map",
49+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
50+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
51+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
52+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
4253
]
4354
`;
4455

@@ -83,7 +94,18 @@ exports[`when applied with "sourceMap" option should work with SourceMapDevToolP
8394

8495
exports[`when applied with "sourceMap" option should work with SourceMapDevToolPlugin plugin): errors 1`] = `[]`;
8596

86-
exports[`when applied with "sourceMap" option should work with SourceMapDevToolPlugin plugin): warnings 1`] = `[]`;
97+
exports[`when applied with "sourceMap" option should work with SourceMapDevToolPlugin plugin): warnings 1`] = `
98+
[
99+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
100+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
101+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
102+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
103+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
104+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
105+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
106+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.scss:0:8:",
107+
]
108+
`;
87109

88110
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "false" value: assets 1`] = `
89111
{
@@ -126,7 +148,18 @@ exports[`when applied with "sourceMap" option should work with the "devtool" opt
126148

127149
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "false" value: errors 1`] = `[]`;
128150

129-
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "false" value: warnings 1`] = `[]`;
151+
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "false" value: warnings 1`] = `
152+
[
153+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
154+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
155+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
156+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
157+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
158+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
159+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
160+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.scss:0:8:",
161+
]
162+
`;
130163

131164
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "true" value: assets 1`] = `
132165
{
@@ -169,7 +202,18 @@ exports[`when applied with "sourceMap" option should work with the "devtool" opt
169202

170203
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "true" value: errors 1`] = `[]`;
171204

172-
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "true" value: warnings 1`] = `[]`;
205+
exports[`when applied with "sourceMap" option should work with the "devtool" option and the "parallel" option with "true" value: warnings 1`] = `
206+
[
207+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
208+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
209+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
210+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
211+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
212+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
213+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
214+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.scss:0:8:",
215+
]
216+
`;
173217

174218
exports[`when applied with "sourceMap" option should work with the "devtool" option: assets 1`] = `
175219
{
@@ -212,4 +256,15 @@ exports[`when applied with "sourceMap" option should work with the "devtool" opt
212256

213257
exports[`when applied with "sourceMap" option should work with the "devtool" option: errors 1`] = `[]`;
214258

215-
exports[`when applied with "sourceMap" option should work with the "devtool" option: warnings 1`] = `[]`;
259+
exports[`when applied with "sourceMap" option should work with the "devtool" option: warnings 1`] = `
260+
[
261+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
262+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
263+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
264+
Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.",
265+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
266+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.css:0:8:",
267+
"ModuleWarning: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
268+
Deprecation Warning on line 0, column 8 of file:///test/fixtures/sourcemap/foo.scss:0:8:",
269+
]
270+
`;

test/__snapshots__/worker.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`worker should emit error: error 1`] = `
44
[
5-
"/entry.css:1:1: Unknown word",
5+
"/entry.css:1:1: Unknown word false",
66
]
77
`;
88

types/index.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ declare class CssMinimizerPlugin<T = CssNanoOptionsExtended> {
4545
* @param {BasePluginOptions & DefinedDefaultMinimizerAndOptions<T>} [options]
4646
*/
4747
constructor(
48-
options?:
49-
| (BasePluginOptions & DefinedDefaultMinimizerAndOptions<T>)
50-
| undefined,
48+
options?: BasePluginOptions & DefinedDefaultMinimizerAndOptions<T>,
5149
);
5250
/**
5351
* @private

types/utils.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export function memoize<T>(fn: (() => any) | undefined): () => T;
3131
*/
3232
export function cssnanoMinify(
3333
input: Input,
34-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
35-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
34+
sourceMap?: RawSourceMap,
35+
minimizerOptions?: CustomOptions,
3636
): Promise<MinimizedResult>;
3737
export namespace cssnanoMinify {
3838
function supportsWorkerThreads(): boolean;
@@ -45,8 +45,8 @@ export namespace cssnanoMinify {
4545
*/
4646
export function cssoMinify(
4747
input: Input,
48-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
49-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
48+
sourceMap?: RawSourceMap,
49+
minimizerOptions?: CustomOptions,
5050
): Promise<MinimizedResult>;
5151
export namespace cssoMinify {
5252
function supportsWorkerThreads(): boolean;
@@ -59,8 +59,8 @@ export namespace cssoMinify {
5959
*/
6060
export function cleanCssMinify(
6161
input: Input,
62-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
63-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
62+
sourceMap?: RawSourceMap,
63+
minimizerOptions?: CustomOptions,
6464
): Promise<MinimizedResult>;
6565
export namespace cleanCssMinify {
6666
function supportsWorkerThreads(): boolean;
@@ -73,8 +73,8 @@ export namespace cleanCssMinify {
7373
*/
7474
export function esbuildMinify(
7575
input: Input,
76-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
77-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
76+
sourceMap?: RawSourceMap,
77+
minimizerOptions?: CustomOptions,
7878
): Promise<MinimizedResult>;
7979
export namespace esbuildMinify {
8080
function supportsWorkerThreads(): boolean;
@@ -87,8 +87,8 @@ export namespace esbuildMinify {
8787
*/
8888
export function parcelCssMinify(
8989
input: Input,
90-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
91-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
90+
sourceMap?: RawSourceMap,
91+
minimizerOptions?: CustomOptions,
9292
): Promise<MinimizedResult>;
9393
export namespace parcelCssMinify {
9494
function supportsWorkerThreads(): boolean;
@@ -101,8 +101,8 @@ export namespace parcelCssMinify {
101101
*/
102102
export function lightningCssMinify(
103103
input: Input,
104-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
105-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
104+
sourceMap?: RawSourceMap,
105+
minimizerOptions?: CustomOptions,
106106
): Promise<MinimizedResult>;
107107
export namespace lightningCssMinify {
108108
function supportsWorkerThreads(): boolean;
@@ -115,8 +115,8 @@ export namespace lightningCssMinify {
115115
*/
116116
export function swcMinify(
117117
input: Input,
118-
sourceMap?: import("@jridgewell/trace-mapping").EncodedSourceMap | undefined,
119-
minimizerOptions?: import("./index.js").CustomOptions | undefined,
118+
sourceMap?: RawSourceMap,
119+
minimizerOptions?: CustomOptions,
120120
): Promise<MinimizedResult>;
121121
export namespace swcMinify {
122122
function supportsWorkerThreads(): boolean;

0 commit comments

Comments
 (0)