@serwist/next 9.0.12 → 9.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/package.json +13 -13
- package/src/index.ts +7 -5
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAMnE;;;;GAIG;AACH,QAAA,MAAM,eAAe,gBAAiB,qBAAqB,KAAG,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,KAAK,UAAU,CA8NrG,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,6BAA6B,EAAE,CAAC;AACzC,YAAY,EAAE,qBAAqB,IAAI,aAAa,EAAE,6BAA6B,IAAI,qBAAqB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -98,11 +98,11 @@ const validateInjectManifestOptions = (input)=>{
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const dirname = "__dirname" in globalThis ? __dirname : fileURLToPath(new URL(".", import.meta.url));
|
|
101
|
+
let warnedTurbopack = false;
|
|
101
102
|
const withSerwistInit = (userOptions)=>{
|
|
102
|
-
if (process.env.TURBOPACK && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
You can also suppress this warning by setting SERWIST_SUPPRESS_TURBOPACK_WARNING=1.`);
|
|
103
|
+
if (!warnedTurbopack && process.env.TURBOPACK && !userOptions.disable && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
104
|
+
warnedTurbopack = true;
|
|
105
|
+
console.warn(`[@serwist/next] WARNING: You are using '@serwist/next' with \`next dev --turbopack\`, but Serwist doesn't support Turbopack at the moment. It is recommended that you set \`disable\` to \`process.env.NODE_ENV !== \"production\"\`. Follow this issue for progress on Serwist + Turbopack: https://github.com/serwist/serwist/issues/54. You can also suppress this warning by setting SERWIST_SUPPRESS_TURBOPACK_WARNING=1.`);
|
|
106
106
|
}
|
|
107
107
|
return (nextConfig = {})=>({
|
|
108
108
|
...nextConfig,
|
|
@@ -249,7 +249,7 @@ const withSerwistInit = (userOptions)=>{
|
|
|
249
249
|
if (m.url.startsWith(publicFilesPrefix)) {
|
|
250
250
|
m.url = path.posix.join(basePath, m.url.replace(publicFilesPrefix, ""));
|
|
251
251
|
}
|
|
252
|
-
m.url = m.url.replace(/\[/g, "%5B").replace(/\]/g, "%5D");
|
|
252
|
+
m.url = m.url.replace(/\[/g, "%5B").replace(/\]/g, "%5D").replace(/@/g, "%40");
|
|
253
253
|
return m;
|
|
254
254
|
});
|
|
255
255
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/next",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A module that integrates Serwist into your Next.js application.",
|
|
6
6
|
"files": [
|
|
@@ -65,22 +65,22 @@
|
|
|
65
65
|
"chalk": "5.4.1",
|
|
66
66
|
"glob": "10.4.5",
|
|
67
67
|
"zod": "3.24.2",
|
|
68
|
-
"@serwist/build": "9.0.
|
|
69
|
-
"@serwist/webpack-plugin": "9.0.
|
|
70
|
-
"@serwist/window": "9.0.
|
|
71
|
-
"serwist": "9.0.
|
|
68
|
+
"@serwist/build": "9.0.13",
|
|
69
|
+
"@serwist/webpack-plugin": "9.0.13",
|
|
70
|
+
"@serwist/window": "9.0.13",
|
|
71
|
+
"serwist": "9.0.13"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@types/node": "22.
|
|
75
|
-
"next": "15.
|
|
76
|
-
"react": "19.
|
|
77
|
-
"react-dom": "19.
|
|
78
|
-
"rollup": "4.
|
|
79
|
-
"type-fest": "4.
|
|
74
|
+
"@types/node": "22.14.0",
|
|
75
|
+
"next": "15.2.4",
|
|
76
|
+
"react": "19.1.0",
|
|
77
|
+
"react-dom": "19.1.0",
|
|
78
|
+
"rollup": "4.39.0",
|
|
79
|
+
"type-fest": "4.39.1",
|
|
80
80
|
"typescript": "5.6.3",
|
|
81
81
|
"webpack": "5.98.0",
|
|
82
|
-
"@serwist/configs": "9.0.
|
|
83
|
-
"@serwist/utils": "9.0.
|
|
82
|
+
"@serwist/configs": "9.0.13",
|
|
83
|
+
"@serwist/utils": "9.0.13"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"next": ">=14.0.0",
|
package/src/index.ts
CHANGED
|
@@ -13,17 +13,18 @@ import { validateInjectManifestOptions } from "./lib/validator.js";
|
|
|
13
13
|
|
|
14
14
|
const dirname = "__dirname" in globalThis ? __dirname : fileURLToPath(new URL(".", import.meta.url));
|
|
15
15
|
|
|
16
|
+
let warnedTurbopack = false;
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Integrates Serwist into your Next.js app.
|
|
18
20
|
* @param userOptions
|
|
19
21
|
* @returns
|
|
20
22
|
*/
|
|
21
23
|
const withSerwistInit = (userOptions: InjectManifestOptions): ((nextConfig?: NextConfig) => NextConfig) => {
|
|
22
|
-
if (process.env.TURBOPACK && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
24
|
+
if (!warnedTurbopack && process.env.TURBOPACK && !userOptions.disable && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
25
|
+
warnedTurbopack = true;
|
|
23
26
|
console.warn(
|
|
24
|
-
`[@serwist/next] WARNING: You are using '@serwist/next' with \`next dev --turbopack\`, but Serwist doesn't support Turbopack at the moment. It is recommended
|
|
25
|
-
that you set \`disable\` to \`process.env.NODE_ENV !== \"production\"\`. Follow this issue for progress on Serwist + Turbopack: https://github.com/serwist/serwist/issues/54.
|
|
26
|
-
You can also suppress this warning by setting SERWIST_SUPPRESS_TURBOPACK_WARNING=1.`,
|
|
27
|
+
`[@serwist/next] WARNING: You are using '@serwist/next' with \`next dev --turbopack\`, but Serwist doesn't support Turbopack at the moment. It is recommended that you set \`disable\` to \`process.env.NODE_ENV !== \"production\"\`. Follow this issue for progress on Serwist + Turbopack: https://github.com/serwist/serwist/issues/54. You can also suppress this warning by setting SERWIST_SUPPRESS_TURBOPACK_WARNING=1.`,
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
return (nextConfig = {}) => ({
|
|
@@ -211,6 +212,7 @@ const withSerwistInit = (userOptions: InjectManifestOptions): ((nextConfig?: Nex
|
|
|
211
212
|
},
|
|
212
213
|
],
|
|
213
214
|
manifestTransforms: [
|
|
215
|
+
// TODO(ducanhgh): move this spread to below our transform function?
|
|
214
216
|
...manifestTransforms,
|
|
215
217
|
async (manifestEntries, compilation) => {
|
|
216
218
|
// This path always uses forward slashes, so it is safe to use it in the following string replace.
|
|
@@ -226,7 +228,7 @@ const withSerwistInit = (userOptions: InjectManifestOptions): ((nextConfig?: Nex
|
|
|
226
228
|
if (m.url.startsWith(publicFilesPrefix)) {
|
|
227
229
|
m.url = path.posix.join(basePath, m.url.replace(publicFilesPrefix, ""));
|
|
228
230
|
}
|
|
229
|
-
m.url = m.url.replace(/\[/g, "%5B").replace(/\]/g, "%5D");
|
|
231
|
+
m.url = m.url.replace(/\[/g, "%5B").replace(/\]/g, "%5D").replace(/@/g, "%40");
|
|
230
232
|
return m;
|
|
231
233
|
});
|
|
232
234
|
return { manifest, warnings: [] };
|