@serwist/next 9.0.12 → 9.0.14

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.
@@ -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,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"}
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
- 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.`);
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 https://github.com/serwist/serwist/issues/54 for progress on Serwist + Turbopack. 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 {
@@ -24,7 +24,7 @@ export declare const injectPartial: z.ZodObject<{
24
24
  swUrl?: string | undefined;
25
25
  globPublicPatterns?: string[] | undefined;
26
26
  }>;
27
- export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
27
+ export declare const injectManifestOptions: z.ZodObject<Omit<{
28
28
  additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
29
29
  integrity: z.ZodOptional<z.ZodString>;
30
30
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -40,13 +40,13 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
40
40
  }>]>, "many">>;
41
41
  disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
42
42
  dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
43
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
43
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
44
44
  integrity: z.ZodOptional<z.ZodString>;
45
45
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
46
  url: z.ZodString;
47
- }, {
47
+ } & {
48
48
  size: z.ZodNumber;
49
- }>, "strip", z.ZodTypeAny, {
49
+ }, "strip", z.ZodTypeAny, {
50
50
  url: string;
51
51
  size: number;
52
52
  integrity?: string | undefined;
@@ -57,13 +57,13 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
57
57
  integrity?: string | undefined;
58
58
  revision?: string | null | undefined;
59
59
  }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
60
- manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
60
+ manifest: z.ZodArray<z.ZodObject<{
61
61
  integrity: z.ZodOptional<z.ZodString>;
62
62
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
63
  url: z.ZodString;
64
- }, {
64
+ } & {
65
65
  size: z.ZodNumber;
66
- }>, "strip", z.ZodTypeAny, {
66
+ }, "strip", z.ZodTypeAny, {
67
67
  url: string;
68
68
  size: number;
69
69
  integrity?: string | undefined;
@@ -92,13 +92,13 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
92
92
  }[];
93
93
  warnings?: string[] | undefined;
94
94
  }>>, z.ZodObject<{
95
- manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
95
+ manifest: z.ZodArray<z.ZodObject<{
96
96
  integrity: z.ZodOptional<z.ZodString>;
97
97
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
98
  url: z.ZodString;
99
- }, {
99
+ } & {
100
100
  size: z.ZodNumber;
101
- }>, "strip", z.ZodTypeAny, {
101
+ }, "strip", z.ZodTypeAny, {
102
102
  url: string;
103
103
  size: number;
104
104
  integrity?: string | undefined;
@@ -129,23 +129,17 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
129
129
  }>]>>, "many">>;
130
130
  maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
131
131
  modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
132
- }, {
133
132
  chunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
134
133
  exclude: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
135
134
  excludeChunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
136
135
  include: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
137
- }>, {
138
136
  injectionPoint: z.ZodDefault<z.ZodString>;
139
137
  swSrc: z.ZodString;
140
- }>, {
141
- swDest: z.ZodOptional<z.ZodString>;
142
- }>, {
143
138
  compileSrc: z.ZodDefault<z.ZodBoolean>;
144
- swDest: z.ZodOptional<z.ZodString>;
145
139
  webpackCompilationPlugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
146
- }>, {
140
+ } & {
147
141
  swDest: z.ZodString;
148
- }>, {
142
+ } & {
149
143
  cacheOnNavigation: z.ZodDefault<z.ZodBoolean>;
150
144
  disable: z.ZodDefault<z.ZodBoolean>;
151
145
  register: z.ZodDefault<z.ZodBoolean>;
@@ -153,7 +147,7 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
153
147
  scope: z.ZodOptional<z.ZodString>;
154
148
  swUrl: z.ZodDefault<z.ZodString>;
155
149
  globPublicPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
156
- }>, "disablePrecacheManifest">, "strict", z.ZodTypeAny, {
150
+ }, "disablePrecacheManifest">, "strict", z.ZodTypeAny, {
157
151
  cacheOnNavigation: boolean;
158
152
  disable: boolean;
159
153
  register: boolean;
@@ -164,8 +158,8 @@ export declare const injectManifestOptions: z.ZodObject<Omit<z.objectUtil.extend
164
158
  exclude: (string | RegExp | ((args_0: any) => boolean))[];
165
159
  injectionPoint: string;
166
160
  swSrc: string;
167
- swDest: string;
168
161
  compileSrc: boolean;
162
+ swDest: string;
169
163
  scope?: string | undefined;
170
164
  additionalPrecacheEntries?: (string | {
171
165
  url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;EAU+C,CAAC;AAE1E,eAAO,MAAM,qBAAqB;+BAKyxB,EAAG,WAAW,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAC,EAAG,SAAS;mBAAqB,EAAG,WAAW,CAAC,EAAE,SAAS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E,EAAE,SAAS,EAAC,EAAG,OAAO,SAAQ,EAAG,UAAU,WAAU,EAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,UAAS,EAAG,UAAU;mBAAiC,EAAG,WAAW,CAAC,EAAE,QAAQ,CAAC,EAAE,SAAS;aAAwB,EAAG,WAAW,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAC,EAAG,OAAO,SAAQ,EAAG,UAAU,WAAU,EAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,UAAS,EAAG,UAAU;oBAAkC,EAAG,UAAU,CAAC,EAAE,SAAS;WAAa,EAAG,SAAS;gBAAuB,EAAG,UAAU,CAAC,EAAE,UAAU;+BAAyE,EAAG,WAAW,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM;;YAd1iK,EAAI,SAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAcg2H,CAAC;oBAA0C,CAAC;;;;;;;qBAAvrC,CAAC;oBAA0C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAm0C,CAAC;oBAA0C,CAAC;;;;;;;qBAAvrC,CAAC;oBAA0C,CAAC;;;;;;;;;;;;;EADj7F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/next",
3
- "version": "9.0.12",
3
+ "version": "9.0.14",
4
4
  "type": "module",
5
5
  "description": "A module that integrates Serwist into your Next.js application.",
6
6
  "files": [
@@ -64,23 +64,23 @@
64
64
  "dependencies": {
65
65
  "chalk": "5.4.1",
66
66
  "glob": "10.4.5",
67
- "zod": "3.24.2",
68
- "@serwist/build": "9.0.12",
69
- "@serwist/webpack-plugin": "9.0.12",
70
- "@serwist/window": "9.0.12",
71
- "serwist": "9.0.12"
67
+ "zod": "3.24.3",
68
+ "@serwist/build": "9.0.14",
69
+ "@serwist/webpack-plugin": "9.0.14",
70
+ "@serwist/window": "9.0.14",
71
+ "serwist": "9.0.14"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/node": "22.13.5",
75
- "next": "15.1.7",
76
- "react": "19.0.0",
77
- "react-dom": "19.0.0",
78
- "rollup": "4.34.8",
79
- "type-fest": "4.35.0",
74
+ "@types/node": "22.14.1",
75
+ "next": "15.3.1",
76
+ "react": "19.1.0",
77
+ "react-dom": "19.1.0",
78
+ "rollup": "4.40.0",
79
+ "type-fest": "4.40.0",
80
80
  "typescript": "5.6.3",
81
- "webpack": "5.98.0",
82
- "@serwist/configs": "9.0.12",
83
- "@serwist/utils": "9.0.12"
81
+ "webpack": "5.99.6",
82
+ "@serwist/configs": "9.0.14",
83
+ "@serwist/utils": "9.0.14"
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 https://github.com/serwist/serwist/issues/54 for progress on Serwist + Turbopack. 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: [] };