diff --git a/.changeset/breezy-walls-stare.md b/.changeset/breezy-walls-stare.md deleted file mode 100644 index a96847033..000000000 --- a/.changeset/breezy-walls-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cloudflare/next-on-pages': patch ---- - -Fix autogenerated content also getting appended to the original public/\_headers file diff --git a/.changeset/thirty-birds-build.md b/.changeset/thirty-birds-build.md deleted file mode 100644 index 3bf269368..000000000 --- a/.changeset/thirty-birds-build.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'@cloudflare/next-on-pages': patch ---- - -fix: implement route specific global scoping strategy - -currently routes all share the same global scope, this can be problematic and cause -race conditions and failures - -One example of this is the following code that is present in route function files: - -```ts -self.webpackChunk_N_E = ... -``` - -and - -```ts -self.webpackChunk_N_E.push(...) -``` - -this indicates that an in-memory global collection of the webpack chunks is shared by all routes, -this combined with the fact that chunks can have their own module state this can easily cause routes to conflict with each other at runtime. - -So, in order to solve the above issue, all route functions are wrapped in a function which accepts as parameters, thus overrides, the `self`, `globalThis` and `global` symbols. The symbols -will be resolved with proxies that redirect setters to route-scoped in-memory maps and -getters to the above mentioned map's values and fallback to the original symbol values otherwise -(i.e. `globalThis` will be overridden by a proxy that, when setting values, sets them in a separate -location and, when getting values, gets them from said location if present there or from the real -`globalThis` otherwise) diff --git a/packages/eslint-plugin-next-on-pages/CHANGELOG.md b/packages/eslint-plugin-next-on-pages/CHANGELOG.md index 45f20db0b..46a8cbcf2 100644 --- a/packages/eslint-plugin-next-on-pages/CHANGELOG.md +++ b/packages/eslint-plugin-next-on-pages/CHANGELOG.md @@ -1,5 +1,7 @@ # eslint-plugin-next-on-pages +## 1.13.2 + ## 1.13.1 ## 1.13.0 diff --git a/packages/eslint-plugin-next-on-pages/package.json b/packages/eslint-plugin-next-on-pages/package.json index d7701addc..28578952f 100644 --- a/packages/eslint-plugin-next-on-pages/package.json +++ b/packages/eslint-plugin-next-on-pages/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-next-on-pages", - "version": "1.13.1", + "version": "1.13.2", "main": "dist/index.js", "scripts": { "prebuild": "rimraf dist", diff --git a/packages/next-on-pages/CHANGELOG.md b/packages/next-on-pages/CHANGELOG.md index 19848be55..02feffc82 100644 --- a/packages/next-on-pages/CHANGELOG.md +++ b/packages/next-on-pages/CHANGELOG.md @@ -1,5 +1,37 @@ # @cloudflare/next-on-pages +## 1.13.2 + +### Patch Changes + +- 968171a: Fix autogenerated content also getting appended to the original public/\_headers file +- 2115b9e: fix: implement route specific global scoping strategy + + currently routes all share the same global scope, this can be problematic and cause + race conditions and failures + + One example of this is the following code that is present in route function files: + + ```ts + self.webpackChunk_N_E = ... + ``` + + and + + ```ts + self.webpackChunk_N_E.push(...) + ``` + + this indicates that an in-memory global collection of the webpack chunks is shared by all routes, + this combined with the fact that chunks can have their own module state this can easily cause routes to conflict with each other at runtime. + + So, in order to solve the above issue, all route functions are wrapped in a function which accepts as parameters, thus overrides, the `self`, `globalThis` and `global` symbols. The symbols + will be resolved with proxies that redirect setters to route-scoped in-memory maps and + getters to the above mentioned map's values and fallback to the original symbol values otherwise + (i.e. `globalThis` will be overridden by a proxy that, when setting values, sets them in a separate + location and, when getting values, gets them from said location if present there or from the real + `globalThis` otherwise) + ## 1.13.1 ### Patch Changes diff --git a/packages/next-on-pages/package.json b/packages/next-on-pages/package.json index 4eff99f6e..7708bf4a9 100644 --- a/packages/next-on-pages/package.json +++ b/packages/next-on-pages/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/next-on-pages", - "version": "1.13.1", + "version": "1.13.2", "bin": "./bin/index.js", "exports": { ".": {