nextjs-cms 0.5.99 → 0.5.100
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":"loader-with-jiti.d.ts","sourceRoot":"","sources":["../../../src/core/config/loader-with-jiti.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader-with-jiti.d.ts","sourceRoot":"","sources":["../../../src/core/config/loader-with-jiti.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,sBAAsB,cAAmC,CAAA;AAiHtE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,OAAO,CA4BxD,CAAA"}
|
|
@@ -25,6 +25,14 @@ const configWatcherState = (() => {
|
|
|
25
25
|
}
|
|
26
26
|
return globalAny[key];
|
|
27
27
|
})();
|
|
28
|
+
/**
|
|
29
|
+
* Reset the jiti instance to force a fresh instance on next use.
|
|
30
|
+
* This is needed when section files change to ensure jiti re-reads and re-transpiles them.
|
|
31
|
+
* The moduleCache option in jiti can hold stale transpiled code even after clearing jiti.cache.
|
|
32
|
+
*/
|
|
33
|
+
const resetJitiInstance = () => {
|
|
34
|
+
jitiInstance = null;
|
|
35
|
+
};
|
|
28
36
|
export const getConfigImportVersion = () => configWatcherState.version;
|
|
29
37
|
const clearJitiCache = (absPath) => {
|
|
30
38
|
if (!jitiInstance)
|
|
@@ -53,6 +61,9 @@ const clearJitiCache = (absPath) => {
|
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
}
|
|
64
|
+
// Reset the jiti instance entirely to clear any internal state
|
|
65
|
+
// This is needed because jiti's moduleCache can hold stale transpiled code
|
|
66
|
+
resetJitiInstance();
|
|
56
67
|
};
|
|
57
68
|
const bumpHotMarker = async () => {
|
|
58
69
|
if (process.env.NODE_ENV === 'production')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.100",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -184,8 +184,8 @@
|
|
|
184
184
|
"tsx": "^4.20.6",
|
|
185
185
|
"typescript": "^5.9.2",
|
|
186
186
|
"@lzcms/eslint-config": "0.3.0",
|
|
187
|
-
"@lzcms/
|
|
188
|
-
"@lzcms/
|
|
187
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
188
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
189
189
|
},
|
|
190
190
|
"license": "MIT",
|
|
191
191
|
"keywords": [
|