@arcgis/lumina-compiler 4.33.0-next.105 → 4.33.0-next.107
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/dependencies/discover.d.ts +2 -2
- package/dist/docs/stencilDocsJson.d.ts +5 -1
- package/dist/index.js +1311 -1252
- package/dist/plugins/buildCdn.d.ts +28 -25
- package/dist/plugins/configureVite.d.ts +2 -2
- package/dist/publicTypes.d.ts +11 -2
- package/package.json +5 -5
|
@@ -15,6 +15,7 @@ export declare function buildCdn(context: CompilerContext): Plugin | undefined;
|
|
|
15
15
|
type Chunk = {
|
|
16
16
|
code: string;
|
|
17
17
|
isAsync: boolean | undefined;
|
|
18
|
+
oldSingleExportName: string | undefined;
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* Transform each core-importing chunk to use $arcgis.t for loading core in
|
|
@@ -27,9 +28,9 @@ type Chunk = {
|
|
|
27
28
|
* and https://bugs.webkit.org/show_bug.cgi?id=242740), we are no longer using
|
|
28
29
|
* top-level await.
|
|
29
30
|
*
|
|
30
|
-
* Instead, we insert a top-level await polyfill -
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* Instead, we insert a top-level await polyfill - any module that imports core
|
|
32
|
+
* directly or indirectly is transformed to have a promise as a default export -
|
|
33
|
+
* such promise, once awaited, yields the actual exports of the module.
|
|
33
34
|
*
|
|
34
35
|
* List of other solutions considered:
|
|
35
36
|
* https://devtopia.esri.com/WebGIS/arcgis-web-components/discussions/3999
|
|
@@ -45,38 +46,40 @@ type Chunk = {
|
|
|
45
46
|
* export { s as ArcgisNavigationToggle };
|
|
46
47
|
*
|
|
47
48
|
* /// AFTER
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* (
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* _0,
|
|
63
|
-
* );
|
|
64
|
-
* // _1 will only be assigned once $$ resolves
|
|
65
|
-
* export { $$, _1 as ArcgisNavigationToggle };
|
|
49
|
+
* import a from "./U7MU7PMX.js";
|
|
50
|
+
* export default $arcgis.t(
|
|
51
|
+
* ([{ when: M }, { b }]) => {
|
|
52
|
+
* // The "meat" of the file is kept unchanged by the transform
|
|
53
|
+
* // (we only touch the imports, and the very last export line)
|
|
54
|
+
* s = class extends v {
|
|
55
|
+
* // ...
|
|
56
|
+
* };
|
|
57
|
+
* // Resolve the promise by returning the exported class
|
|
58
|
+
* return s;
|
|
59
|
+
* },
|
|
60
|
+
* "core/reactiveUtils",
|
|
61
|
+
* a,
|
|
62
|
+
* );
|
|
66
63
|
* ```
|
|
67
64
|
*/
|
|
68
65
|
declare function transformChunk(chunk: Chunk, chunks: Map<string, Chunk>): void;
|
|
69
66
|
/**
|
|
70
67
|
* @example Dynamic core import
|
|
71
68
|
* ```diff
|
|
72
|
-
* -
|
|
73
|
-
*
|
|
69
|
+
* -import("core/Handles");
|
|
70
|
+
* +$arcgis.t(m=>m[0],"core/Handles")
|
|
74
71
|
* ```
|
|
75
72
|
*
|
|
76
73
|
* @example Dynamic import of a chunk with top-level await
|
|
77
74
|
* ```diff
|
|
78
|
-
* -
|
|
79
|
-
* +
|
|
75
|
+
* -import("./chunk.js");
|
|
76
|
+
* +import("./chunk.js").then(m=>m.default)
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example Dynamic import of a chunk with top-level await and single export that got inlined
|
|
80
|
+
* ```diff
|
|
81
|
+
* -import("./chunk.js");
|
|
82
|
+
* +import("./chunk.js").then(m=>m.default.then(e=>({ArcgisHome:e})))
|
|
80
83
|
* ```
|
|
81
84
|
*/
|
|
82
85
|
declare function transformDynamicCoreImports(code: string, chunks: Map<string, Chunk>): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
import { CompilerContext } from '../context';
|
|
3
|
-
import { PuppeteerLaunchOptions } from 'puppeteer';
|
|
4
3
|
import { InlineConfig } from 'vitest/node';
|
|
4
|
+
import { PuppeteerTestingOptions } from '../publicTypes';
|
|
5
5
|
export type PuppeteerVitestConfigOptions = InlineConfig & {
|
|
6
|
-
puppeteerLaunchOptions?:
|
|
6
|
+
puppeteerLaunchOptions?: PuppeteerTestingOptions["launchOptions"];
|
|
7
7
|
puppeteerWaitForChangesDelay?: number;
|
|
8
8
|
};
|
|
9
9
|
/**
|
package/dist/publicTypes.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { build as esbuildBuild } from 'esbuild';
|
|
|
4
4
|
import { CompilerContext } from './context';
|
|
5
5
|
import { PluginOptions as VitePluginDtsOptions } from 'vite-plugin-dts';
|
|
6
6
|
import { ExternalsOptions as RollupPluginNodeExternalsOptions } from 'rollup-plugin-node-externals';
|
|
7
|
-
import { PuppeteerLaunchOptions } from 'puppeteer';
|
|
8
7
|
import { WebTypesOptions } from './docs/webTypes/types';
|
|
9
8
|
import { VsCodeDocOptions } from './docs/vsCodeCustomData/types';
|
|
10
9
|
import { ApiJson, ApiModule } from '@arcgis/api-extractor';
|
|
@@ -270,7 +269,17 @@ export type PuppeteerTestingOptions = {
|
|
|
270
269
|
* @default 0
|
|
271
270
|
*/
|
|
272
271
|
readonly waitForChangesDelay?: number;
|
|
273
|
-
|
|
272
|
+
/**
|
|
273
|
+
* @example
|
|
274
|
+
* ```ts
|
|
275
|
+
* import type { LaunchOptions } from "puppeteer";
|
|
276
|
+
* // ...
|
|
277
|
+
* launchOptions: {
|
|
278
|
+
* args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
279
|
+
* } satisfies LaunchOptions;
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
readonly launchOptions?: Record<string, unknown>;
|
|
274
283
|
};
|
|
275
284
|
export type GenerateDocumentationOptions = {
|
|
276
285
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina-compiler",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.107",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcgis/api-extractor": "4.33.0-next.
|
|
22
|
-
"@arcgis/components-build-utils": "4.33.0-next.
|
|
23
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
21
|
+
"@arcgis/api-extractor": "4.33.0-next.107",
|
|
22
|
+
"@arcgis/components-build-utils": "4.33.0-next.107",
|
|
23
|
+
"@arcgis/components-utils": "4.33.0-next.107",
|
|
24
24
|
"chalk": "^5.3.0",
|
|
25
25
|
"esbuild": "^0.24.0",
|
|
26
26
|
"glob": "^11.0.0",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"vitest-fail-on-console": "^0.7.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@arcgis/lumina": "~4.33.0-next.
|
|
40
|
+
"@arcgis/lumina": "~4.33.0-next.107"
|
|
41
41
|
}
|
|
42
42
|
}
|