@serwist/next 9.0.12 → 10.0.0-preview.1
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 +0 -5
- package/dist/lib/types.d.ts +4 -4
- package/dist/lib/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +0 -7
- package/src/lib/types.ts +7 -6
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;AAInE;;;;GAIG;AACH,QAAA,MAAM,eAAe,gBAAiB,qBAAqB,KAAG,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,KAAK,UAAU,
|
|
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;AAInE;;;;GAIG;AACH,QAAA,MAAM,eAAe,gBAAiB,qBAAqB,KAAG,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,KAAK,UAAU,CAuNrG,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
|
@@ -99,11 +99,6 @@ const validateInjectManifestOptions = (input)=>{
|
|
|
99
99
|
|
|
100
100
|
const dirname = "__dirname" in globalThis ? __dirname : fileURLToPath(new URL(".", import.meta.url));
|
|
101
101
|
const withSerwistInit = (userOptions)=>{
|
|
102
|
-
if (process.env.TURBOPACK && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
103
|
-
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
|
|
104
|
-
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.
|
|
105
|
-
You can also suppress this warning by setting SERWIST_SUPPRESS_TURBOPACK_WARNING=1.`);
|
|
106
|
-
}
|
|
107
102
|
return (nextConfig = {})=>({
|
|
108
103
|
...nextConfig,
|
|
109
104
|
webpack (config, options) {
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequiredSwDestPartial, RequiredSwDestResolved } from "@serwist/build";
|
|
2
|
-
import type { Require } from "@serwist/utils";
|
|
2
|
+
import type { Prettify, Require } from "@serwist/utils";
|
|
3
3
|
import type { InjectManifestOptions as WebpackInjectManifestOptions, InjectManifestOptionsComplete as WebpackInjectManifestOptionsComplete } from "@serwist/webpack-plugin";
|
|
4
4
|
export interface InjectPartial {
|
|
5
5
|
/**
|
|
@@ -89,7 +89,7 @@ export interface InjectPartial {
|
|
|
89
89
|
*/
|
|
90
90
|
globPublicPatterns?: string[];
|
|
91
91
|
}
|
|
92
|
-
export type InjectResolved = Require<InjectPartial, "cacheOnNavigation" | "disable" | "register" | "reloadOnOnline" | "swUrl" | "globPublicPatterns"
|
|
93
|
-
export type InjectManifestOptions = Omit<WebpackInjectManifestOptions & RequiredSwDestPartial & InjectPartial, "disablePrecacheManifest"
|
|
94
|
-
export type InjectManifestOptionsComplete = Omit<WebpackInjectManifestOptionsComplete & RequiredSwDestResolved & InjectResolved, "disablePrecacheManifest"
|
|
92
|
+
export type InjectResolved = Prettify<Require<InjectPartial, "cacheOnNavigation" | "disable" | "register" | "reloadOnOnline" | "swUrl" | "globPublicPatterns">>;
|
|
93
|
+
export type InjectManifestOptions = Prettify<Omit<WebpackInjectManifestOptions & RequiredSwDestPartial & InjectPartial, "disablePrecacheManifest">>;
|
|
94
|
+
export type InjectManifestOptionsComplete = Prettify<Omit<WebpackInjectManifestOptionsComplete & RequiredSwDestResolved & InjectResolved, "disablePrecacheManifest">>;
|
|
95
95
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EACV,qBAAqB,IAAI,4BAA4B,EACrD,6BAA6B,IAAI,oCAAoC,EACtE,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,OAAO,CAAC,aAAa,EAAE,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,gBAAgB,GAAG,OAAO,GAAG,oBAAoB,CAAC,CACzH,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,CAAC,4BAA4B,GAAG,qBAAqB,GAAG,aAAa,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAEpJ,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAClD,IAAI,CAAC,oCAAoC,GAAG,sBAAsB,GAAG,cAAc,EAAE,yBAAyB,CAAC,CAChH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/next",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-preview.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A module that integrates Serwist into your Next.js application.",
|
|
6
6
|
"files": [
|
|
@@ -65,10 +65,11 @@
|
|
|
65
65
|
"chalk": "5.4.1",
|
|
66
66
|
"glob": "10.4.5",
|
|
67
67
|
"zod": "3.24.2",
|
|
68
|
-
"@serwist/build": "
|
|
69
|
-
"@serwist/
|
|
70
|
-
"@serwist/
|
|
71
|
-
"serwist": "
|
|
68
|
+
"@serwist/build": "10.0.0-preview.1",
|
|
69
|
+
"@serwist/utils": "10.0.0-preview.1",
|
|
70
|
+
"@serwist/webpack-plugin": "10.0.0-preview.1",
|
|
71
|
+
"@serwist/window": "10.0.0-preview.1",
|
|
72
|
+
"serwist": "10.0.0-preview.1"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@types/node": "22.13.5",
|
|
@@ -77,10 +78,9 @@
|
|
|
77
78
|
"react-dom": "19.0.0",
|
|
78
79
|
"rollup": "4.34.8",
|
|
79
80
|
"type-fest": "4.35.0",
|
|
80
|
-
"typescript": "5.
|
|
81
|
+
"typescript": "5.7.3",
|
|
81
82
|
"webpack": "5.98.0",
|
|
82
|
-
"@serwist/configs": "
|
|
83
|
-
"@serwist/utils": "9.0.12"
|
|
83
|
+
"@serwist/configs": "10.0.0-preview.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"next": ">=14.0.0",
|
package/src/index.ts
CHANGED
|
@@ -19,13 +19,6 @@ const dirname = "__dirname" in globalThis ? __dirname : fileURLToPath(new URL(".
|
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
21
|
const withSerwistInit = (userOptions: InjectManifestOptions): ((nextConfig?: NextConfig) => NextConfig) => {
|
|
22
|
-
if (process.env.TURBOPACK && !process.env.SERWIST_SUPPRESS_TURBOPACK_WARNING) {
|
|
23
|
-
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
|
-
);
|
|
28
|
-
}
|
|
29
22
|
return (nextConfig = {}) => ({
|
|
30
23
|
...nextConfig,
|
|
31
24
|
webpack(config: Configuration, options) {
|
package/src/lib/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequiredSwDestPartial, RequiredSwDestResolved } from "@serwist/build";
|
|
2
|
-
import type { Require } from "@serwist/utils";
|
|
2
|
+
import type { Prettify, Require } from "@serwist/utils";
|
|
3
3
|
import type {
|
|
4
4
|
InjectManifestOptions as WebpackInjectManifestOptions,
|
|
5
5
|
InjectManifestOptionsComplete as WebpackInjectManifestOptionsComplete,
|
|
@@ -94,11 +94,12 @@ export interface InjectPartial {
|
|
|
94
94
|
globPublicPatterns?: string[];
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export type InjectResolved =
|
|
97
|
+
export type InjectResolved = Prettify<
|
|
98
|
+
Require<InjectPartial, "cacheOnNavigation" | "disable" | "register" | "reloadOnOnline" | "swUrl" | "globPublicPatterns">
|
|
99
|
+
>;
|
|
98
100
|
|
|
99
|
-
export type InjectManifestOptions = Omit<WebpackInjectManifestOptions & RequiredSwDestPartial & InjectPartial, "disablePrecacheManifest"
|
|
101
|
+
export type InjectManifestOptions = Prettify<Omit<WebpackInjectManifestOptions & RequiredSwDestPartial & InjectPartial, "disablePrecacheManifest">>;
|
|
100
102
|
|
|
101
|
-
export type InjectManifestOptionsComplete =
|
|
102
|
-
WebpackInjectManifestOptionsComplete & RequiredSwDestResolved & InjectResolved,
|
|
103
|
-
"disablePrecacheManifest"
|
|
103
|
+
export type InjectManifestOptionsComplete = Prettify<
|
|
104
|
+
Omit<WebpackInjectManifestOptionsComplete & RequiredSwDestResolved & InjectResolved, "disablePrecacheManifest">
|
|
104
105
|
>;
|