babel-plugin-saykit 0.9.1 → 0.10.0
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/index.d.cts
CHANGED
|
@@ -12,9 +12,9 @@ interface Options {
|
|
|
12
12
|
* `'inline'` (the default) replaces the import with the assembled record, so
|
|
13
13
|
* the Babel plugin is enough on its own. The cost is that the record lands in
|
|
14
14
|
* the importing module, which a bundler only re-reads when that module's own
|
|
15
|
-
* bytes change
|
|
15
|
+
* bytes change, editing a catalogue will not hot-reload.
|
|
16
16
|
*
|
|
17
|
-
* `'module'` leaves the import for a bundler integration to serve
|
|
17
|
+
* `'module'` leaves the import for a bundler integration to serve, either
|
|
18
18
|
* `babel-plugin-saykit/next` or `babel-plugin-saykit/metro`. Set this
|
|
19
19
|
* whenever one of those is wired up, or the import gets inlined before the
|
|
20
20
|
* integration is ever asked for the module.
|
package/dist/metro/index.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ interface MetroConfig {
|
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* Metro's transform cache is keyed on each file's own bytes, so a catalogue has
|
|
19
|
-
* to stay a module of its own to be invalidated at all
|
|
19
|
+
* to stay a module of its own to be invalidated at all; see
|
|
20
20
|
* `./transformer.ts`.
|
|
21
21
|
*
|
|
22
22
|
* Apply this outermost. Anything wrapped around it that also sets
|
|
@@ -11,8 +11,8 @@ interface TransformerConfig {
|
|
|
11
11
|
* Metro reads `.json` straight through `transformJSON` and never runs Babel over
|
|
12
12
|
* it, so a Babel plugin cannot reach a catalogue at all. Wrapping the transform
|
|
13
13
|
* worker is the one place that can: it substitutes the assembled record for the
|
|
14
|
-
* catalogue's own source, leaving the file a real module whose sha1
|
|
15
|
-
* therefore Metro's transform cache entry
|
|
14
|
+
* catalogue's own source, leaving the file a real module whose sha1, and
|
|
15
|
+
* therefore Metro's transform cache entry, moves whenever it is edited.
|
|
16
16
|
*/
|
|
17
17
|
declare function transform(transformerConfig: TransformerConfig, projectRoot: string, filename: string, data: Buffer, options: unknown): Promise<unknown>;
|
|
18
18
|
declare function getCacheKey(transformerConfig: TransformerConfig, options?: unknown): string;
|
package/dist/next/index.d.cts
CHANGED
|
@@ -25,11 +25,11 @@ interface WebpackConfig {
|
|
|
25
25
|
* export default withSayKit({});
|
|
26
26
|
* ```
|
|
27
27
|
*
|
|
28
|
-
* Pair it with `catalogues: 'module'` on the Babel plugin
|
|
28
|
+
* Pair it with `catalogues: 'module'` on the Babel plugin, which has to
|
|
29
29
|
* leave the import alone for the loader to ever be asked for the module.
|
|
30
30
|
*
|
|
31
31
|
* Rules are derived from the SayKit config, so both bundlers get one per bucket
|
|
32
|
-
* targeting exactly that bucket's `output
|
|
32
|
+
* targeting exactly that bucket's `output`, nothing else sharing the extension
|
|
33
33
|
* goes through the loader, which matters most for a `.json` bucket, where the
|
|
34
34
|
* alternative would be routing every JSON import in the app through it.
|
|
35
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-saykit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Babel plugin for SayKit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"provenance": true
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@saykit/config": "^0.
|
|
51
|
+
"@saykit/config": "^0.10.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@babel/core": "^7.29.7",
|