next-intl 4.14.8 → 4.14.9
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/cjs/development/plugin.cjs +3 -1
- package/dist/esm/development/extractor/extractionLoader.js +3 -1
- package/dist/esm/development/extractor/extractor/MessageExtractor.js +3 -1
- package/dist/esm/production/extractor/extractionLoader.js +1 -1
- package/dist/esm/production/extractor/extractor/MessageExtractor.js +1 -1
- package/package.json +5 -5
|
@@ -1173,7 +1173,9 @@ class MessageExtractor {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
},
|
|
1175
1175
|
sourceMaps: this.sourceMap,
|
|
1176
|
-
|
|
1176
|
+
// Is converted into a relative path by Next.js when
|
|
1177
|
+
// the final source map is generated
|
|
1178
|
+
sourceFileName: absoluteFilePath,
|
|
1177
1179
|
filename: filePath
|
|
1178
1180
|
});
|
|
1179
1181
|
|
|
@@ -19,7 +19,9 @@ function extractionLoader(source) {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
extractor.extract(this.resourcePath, source).then(result => {
|
|
22
|
-
|
|
22
|
+
// Webpack loaders conventionally pass source maps as objects (e.g.
|
|
23
|
+
// `next-swc-loader` calls `JSON.stringify` on its input source map)
|
|
24
|
+
callback(null, result.code, result.map ? JSON.parse(result.map) : undefined);
|
|
23
25
|
}).catch(callback);
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -46,7 +46,9 @@ class MessageExtractor {
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
sourceMaps: this.sourceMap,
|
|
49
|
-
|
|
49
|
+
// Is converted into a relative path by Next.js when
|
|
50
|
+
// the final source map is generated
|
|
51
|
+
sourceFileName: absoluteFilePath,
|
|
50
52
|
filename: filePath
|
|
51
53
|
});
|
|
52
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./extractor/MessageExtractor.js";let e;function o(o){const r=this.async(),s=this.rootContext,
|
|
1
|
+
import t from"./extractor/MessageExtractor.js";let e;function o(o){const r=this.async(),s=this.rootContext,a="development"===process.env["NODE_ENV".trim()];e||(e=new t({isDevelopment:a,projectRoot:s,sourceMap:this.sourceMap})),e.extract(this.resourcePath,o).then((t=>{r(null,t.code,t.map?JSON.parse(t.map):void 0)})).catch(r)}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as e}from"module";import t from"path";import{transform as s}from"@swc/core";import{getDefaultProjectRoot as r,normalizePathToPosix as o}from"../utils.js";import i from"./LRUCache.js";const c=e(import.meta.url);class a{compileCache=new i(750);constructor(e){this.isDevelopment=e.isDevelopment??!1,this.projectRoot=e.projectRoot??r(),this.sourceMap=e.sourceMap??!1}async extract(e,r){const i=[r,e].join("!"),a=this.compileCache.get(i);if(a)return a;if(!r.includes("useExtracted")&&!r.includes("getExtracted"))return{messages:[],code:r};const p=o(t.relative(this.projectRoot,e)),n=await s(r,{jsc:{target:"esnext",parser:{syntax:"typescript",tsx:!0,decorators:!0},experimental:{cacheRoot:"node_modules/.cache/swc",disableBuiltinTransformsForInternalTesting:!0,disableAllLints:!0,plugins:[[c.resolve("next-intl-swc-plugin-extractor"),{isDevelopment:this.isDevelopment,filePath:p}]]}},sourceMaps:this.sourceMap,sourceFileName:
|
|
1
|
+
import{createRequire as e}from"module";import t from"path";import{transform as s}from"@swc/core";import{getDefaultProjectRoot as r,normalizePathToPosix as o}from"../utils.js";import i from"./LRUCache.js";const c=e(import.meta.url);class a{compileCache=new i(750);constructor(e){this.isDevelopment=e.isDevelopment??!1,this.projectRoot=e.projectRoot??r(),this.sourceMap=e.sourceMap??!1}async extract(e,r){const i=[r,e].join("!"),a=this.compileCache.get(i);if(a)return a;if(!r.includes("useExtracted")&&!r.includes("getExtracted"))return{messages:[],code:r};const p=o(t.relative(this.projectRoot,e)),n=await s(r,{jsc:{target:"esnext",parser:{syntax:"typescript",tsx:!0,decorators:!0},experimental:{cacheRoot:"node_modules/.cache/swc",disableBuiltinTransformsForInternalTesting:!0,disableAllLints:!0,plugins:[[c.resolve("next-intl-swc-plugin-extractor"),{isDevelopment:this.isDevelopment,filePath:p}]]}},sourceMaps:this.sourceMap,sourceFileName:e,filename:p}),l=n.output,m=JSON.parse(JSON.parse(l).results).filter((e=>"extracted"===e.type)).map((e=>({id:e.id,message:e.message,description:e.description,reference:e.reference}))),u={code:n.code,map:n.map,messages:m};return this.compileCache.set(i,u),u}}export{a as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intl",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"funding": [
|
|
@@ -130,10 +130,10 @@
|
|
|
130
130
|
"@formatjs/intl-localematcher": "^0.8.1",
|
|
131
131
|
"@parcel/watcher": "^2.4.1",
|
|
132
132
|
"@swc/core": "~1.16.0",
|
|
133
|
-
"icu-minify": "^4.14.
|
|
133
|
+
"icu-minify": "^4.14.9",
|
|
134
134
|
"negotiator": "^1.0.0",
|
|
135
|
-
"next-intl-swc-plugin-extractor": "4.14.
|
|
136
|
-
"use-intl": "^4.14.
|
|
135
|
+
"next-intl-swc-plugin-extractor": "4.14.9",
|
|
136
|
+
"use-intl": "^4.14.9"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"optional": true
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "b9fc98a814957b9c97894c7b57151215ac39afa6"
|
|
149
149
|
}
|