@netlify/plugin-nextjs 4.41.1 → 4.41.3

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.
@@ -107,9 +107,12 @@ const augmentFsModule = ({ promises, staticManifest, blobsManifest, pageRoot, ge
107
107
  require('./blobStorage');
108
108
  // ...then monkey-patch it to see if it's requesting a CDN file
109
109
  promises.readFile = (async (file, options) => {
110
- const baseUrl = getBase();
111
- // We only care about page files
112
- if (file.startsWith(pageRoot)) {
110
+ // file argument can be a string, URL, etc - Next.js cache reading uses a string
111
+ // and that's only thing we really want to handle here, so we just do type checking
112
+ // instead of trying to handle all possible type before checking weather read
113
+ // is about page files.
114
+ if (typeof file === 'string' && file.startsWith(pageRoot)) {
115
+ const baseUrl = getBase();
113
116
  // We only want the part after `.next/server/`
114
117
  const filePath = file.slice(pageRoot.length + 1);
115
118
  if (!(0, fs_1.existsSync)(file)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.41.1",
3
+ "version": "4.41.3",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "@netlify/blobs": "^2.2.0",
16
16
  "@netlify/esbuild": "0.14.39",
17
17
  "@netlify/functions": "^1.6.0",
18
- "@netlify/ipx": "^1.4.5",
18
+ "@netlify/ipx": "^1.4.6",
19
19
  "@vercel/node-bridge": "^2.1.0",
20
20
  "chalk": "^4.1.2",
21
21
  "chokidar": "^3.5.3",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@delucis/if-env": "^1.1.2",
42
- "@netlify/build": "^29.23.1",
42
+ "@netlify/build": "^29.30.0",
43
43
  "@types/fs-extra": "^9.0.13",
44
44
  "@types/jest": "^27.4.1",
45
45
  "@types/merge-stream": "^1.1.2",