@arcgis/lumina-compiler 4.34.0-next.3 → 4.34.0-next.31

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.
@@ -251,6 +251,24 @@ export type DependencyManagementOptions = Omit<RollupPluginNodeExternalsOptions,
251
251
  * technical reasons.
252
252
  */
253
253
  readonly externalize?: NonNullable<RollupPluginNodeExternalsOptions>["include"];
254
+ /**
255
+ * By default, Lumina will error if it encounters usage of an unknown custom
256
+ * element. This setting allows to silence such error if you are manually
257
+ * importing some custom elements.
258
+ *
259
+ * > [!IMPORTANT]
260
+ * >
261
+ * > This option is an escape hatch. Build-time optimizations are not applied
262
+ * > to such custom elements. Additionally, you assume the responsibility for
263
+ * > correctly loading the web component in lazy, non-lazy and CDN builds.
264
+ *
265
+ * @example
266
+ * ```ts
267
+ * // Silence errors for unknown custom elements that start with "fluent-"
268
+ * silenceUnknownJsxElementUsage: (tagName) => tagName.startsWith("fluent-")
269
+ * ```
270
+ */
271
+ readonly silenceUnknownJsxElementUsage?: (tagName: string, fileName: string, context: CompilerContext) => boolean;
254
272
  };
255
273
  export type ServeEnvironmentOptions = {
256
274
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "4.34.0-next.3",
3
+ "version": "4.34.0-next.31",
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.34.0-next.3",
22
- "@arcgis/components-build-utils": "4.34.0-next.3",
23
- "@arcgis/components-utils": "4.34.0-next.3",
21
+ "@arcgis/api-extractor": "4.34.0-next.31",
22
+ "@arcgis/components-build-utils": "4.34.0-next.31",
23
+ "@arcgis/components-utils": "4.34.0-next.31",
24
24
  "chalk": "^5.3.0",
25
25
  "esbuild": "^0.25.4",
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.34.0-next.3"
40
+ "@arcgis/lumina": "~4.34.0-next.31"
41
41
  }
42
42
  }
@@ -1,45 +0,0 @@
1
- /**
2
- * This file is a workaround for a TypeScript bug:
3
- * https://github.com/microsoft/TypeScript/issues/59150
4
- *
5
- * Once that bug is fixed, the code can be simplified like so:
6
- * - This file can be removed
7
- * - For each place where `escapeBackticks` or `escapeForTemplateLiteral` was
8
- * used and the result was passed as the 1st AND 2nd parameter to one of
9
- * ts.factory.createNoSubstitutionTemplateLiteral,
10
- * ts.factory.createTemplateHead, ts.factory.createTemplateMiddle, or
11
- * ts.factory.createTemplateTail, change those places like so:
12
- * - DO NOT call `escapeBackticks` or `escapeForTemplateLiteral` anymore -
13
- * pass the value as is.
14
- * - DO NOT provide the 2nd parameter to the factory function.
15
- * - If `escapeForTemplateLiteral` was used in some other place, it can
16
- * potentially be replaced with a function like this:
17
- * string=>escapeTemplateSubstitution(string).replaceAll('`','\`')
18
- * (where escapeTemplateSubstitution is defined in the current file - move it)
19
- *
20
- * More details:
21
- *
22
- * In template literals, even though we *really* only need to escape ${ and
23
- * backticks, we are escaping non-ASCII characters too as that improves scanner
24
- * performance in JavaScript engines.
25
- *
26
- * This is what esbuild does (https://esbuild.github.io/api/#charset), what
27
- * V8 recommends (https://v8.dev/blog/scanner) and what TypeScript does.
28
- *
29
- * The code in this file has been copied from TypeScript's code for escaping
30
- * template literals (but simplified to remove dead branches and fix eslint
31
- * warnings):
32
- * https://github.com/microsoft/TypeScript/blob/3163fe7e3898c1f48cd9bc097b96e3426cd2a453/src/compiler/utilities.ts#L5918-L5986
33
- *
34
- * TypeScript can automatically escape template literals for us, but we opt out
35
- * of that as, due to a bug, they also escape new line characters which is not
36
- * good as it decreases readability when debugging code.
37
- *
38
- * TypeScript does not expose the template literal escaping utils so we had
39
- * to copy the code here, but modify to not escape new lines.
40
- *
41
- */
42
- declare function escapeNonAsciiString(s: string): string;
43
- export declare const escapeBackticks: typeof escapeNonAsciiString;
44
- export declare const escapeTemplateSubstitution: (str: string) => string;
45
- export {};