@stencil/core 2.17.2 → 2.18.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.
Files changed (65) hide show
  1. package/cli/index.cjs +32 -16
  2. package/cli/index.js +32 -16
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.dom.d.ts +620 -89
  5. package/compiler/lib.dom.iterable.d.ts +27 -3
  6. package/compiler/lib.es2015.core.d.ts +3 -3
  7. package/compiler/lib.es2015.iterable.d.ts +2 -1
  8. package/compiler/lib.es2015.reflect.d.ts +1 -1
  9. package/compiler/lib.es2020.bigint.d.ts +7 -5
  10. package/compiler/lib.es2020.d.ts +2 -0
  11. package/compiler/lib.es2020.date.d.ts +44 -0
  12. package/compiler/lib.es2020.intl.d.ts +51 -11
  13. package/compiler/lib.es2020.number.d.ts +30 -0
  14. package/compiler/lib.es2021.intl.d.ts +106 -4
  15. package/compiler/lib.es2022.array.d.ts +123 -0
  16. package/compiler/lib.es2022.d.ts +26 -0
  17. package/compiler/lib.es2022.error.d.ts +75 -0
  18. package/compiler/lib.es2022.full.d.ts +25 -0
  19. package/compiler/lib.es2022.intl.d.ts +111 -0
  20. package/compiler/lib.es2022.object.d.ts +28 -0
  21. package/compiler/lib.es2022.string.d.ts +27 -0
  22. package/compiler/lib.es5.d.ts +25 -19
  23. package/compiler/lib.esnext.d.ts +1 -1
  24. package/compiler/lib.esnext.intl.d.ts +4 -1
  25. package/compiler/lib.webworker.d.ts +236 -40
  26. package/compiler/lib.webworker.iterable.d.ts +10 -3
  27. package/compiler/package.json +1 -1
  28. package/compiler/stencil.js +689 -232
  29. package/compiler/stencil.min.js +2 -2
  30. package/compiler/sys/in-memory-fs.d.ts +218 -0
  31. package/dependencies.json +10 -1
  32. package/dev-server/client/index.js +1 -1
  33. package/dev-server/client/package.json +1 -1
  34. package/dev-server/connector.html +2 -2
  35. package/dev-server/index.js +1 -1
  36. package/dev-server/package.json +1 -1
  37. package/dev-server/server-process.js +13 -13
  38. package/internal/app-data/package.json +1 -1
  39. package/internal/client/css-shim.js +1 -1
  40. package/internal/client/dom.js +1 -1
  41. package/internal/client/index.js +337 -157
  42. package/internal/client/package.json +1 -1
  43. package/internal/client/patch-browser.js +1 -1
  44. package/internal/client/patch-esm.js +1 -1
  45. package/internal/client/shadow-css.js +1 -1
  46. package/internal/hydrate/package.json +1 -1
  47. package/internal/hydrate/runner.d.ts +1 -1
  48. package/internal/package.json +1 -1
  49. package/internal/stencil-private.d.ts +2 -106
  50. package/internal/stencil-public-compiler.d.ts +42 -8
  51. package/internal/testing/package.json +1 -1
  52. package/mock-doc/index.cjs +77 -61
  53. package/mock-doc/index.d.ts +13 -12
  54. package/mock-doc/index.js +77 -61
  55. package/mock-doc/package.json +1 -1
  56. package/package.json +5 -7
  57. package/screenshot/index.js +10 -10
  58. package/screenshot/package.json +1 -1
  59. package/sys/node/index.js +1 -1
  60. package/sys/node/package.json +1 -1
  61. package/sys/node/worker.js +1 -1
  62. package/testing/index.js +96 -106
  63. package/testing/jest/jest-config.d.ts +1 -1
  64. package/testing/package.json +1 -1
  65. package/testing/testing-utils.d.ts +5 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/client",
3
- "version": "2.17.2",
3
+ "version": "2.18.0",
4
4
  "description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true,
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Browser v2.17.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  import { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';
5
5
  import { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Esm v2.17.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  import { BUILD } from '@stencil/core/internal/app-data';
5
5
  import { CSS, plt, win, promiseResolve } from '@stencil/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v2.17.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v2.18.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  /**
5
5
  * @license
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "2.17.2",
3
+ "version": "2.18.0",
4
4
  "description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,4 +1,4 @@
1
- // Generated by dts-bundle-generator v5.3.0
1
+ // Generated by dts-bundle-generator v6.12.0
2
2
 
3
3
  export declare function createWindowFromHtml(templateHtml: string, uniqueId: string): any;
4
4
  export interface HydrateDocumentOptions {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "2.17.2",
3
+ "version": "2.18.0",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import { BuildResultsComponentGraph } from '.';
2
- import type { BuildEvents, BuildLog, BuildOutput, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, FsWriteOptions, Logger, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, LoggerLineUpdater, TaskCommand } from './stencil-public-compiler';
2
+ import type { BuildEvents, BuildLog, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, LoggerLineUpdater, TaskCommand } from './stencil-public-compiler';
3
3
  import type { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './stencil-public-runtime';
4
+ import type { InMemoryFileSystem } from '../compiler/sys/in-memory-fs';
4
5
  export interface SourceMap {
5
6
  file: string;
6
7
  mappings: string;
@@ -1016,51 +1017,6 @@ export interface EventEmitterData<T = any> {
1016
1017
  cancelable?: boolean;
1017
1018
  composed?: boolean;
1018
1019
  }
1019
- export interface FsReadOptions {
1020
- useCache?: boolean;
1021
- setHash?: boolean;
1022
- }
1023
- export interface FsReaddirOptions {
1024
- inMemoryOnly?: boolean;
1025
- recursive?: boolean;
1026
- /**
1027
- * Directory names to exclude. Just the basename,
1028
- * not the entire path. Basically for "node_moduels".
1029
- */
1030
- excludeDirNames?: string[];
1031
- /**
1032
- * Extensions we know we can avoid. Each extension
1033
- * should include the `.` so that we can test for both
1034
- * `.d.ts.` and `.ts`. If `excludeExtensions` isn't provided it
1035
- * doesn't try to exclude anything. This only checks against
1036
- * the filename, not directory names when recursive.
1037
- */
1038
- excludeExtensions?: string[];
1039
- }
1040
- export interface FsReaddirItem {
1041
- absPath: string;
1042
- relPath: string;
1043
- isDirectory: boolean;
1044
- isFile: boolean;
1045
- }
1046
- export interface FsWriteResults {
1047
- changedContent: boolean;
1048
- queuedWrite: boolean;
1049
- ignored: boolean;
1050
- }
1051
- export declare type FsItems = Map<string, FsItem>;
1052
- export interface FsItem {
1053
- fileText: string;
1054
- isFile: boolean;
1055
- isDirectory: boolean;
1056
- size: number;
1057
- mtimeMs: number;
1058
- exists: boolean;
1059
- queueCopyFileToDest: string;
1060
- queueWriteToDisk: boolean;
1061
- queueDeleteFromDisk?: boolean;
1062
- useCache: boolean;
1063
- }
1064
1020
  export interface HostElement extends HTMLElement {
1065
1021
  connectedCallback?: () => void;
1066
1022
  attributeChangedCallback?: (attribName: string, oldVal: string, newVal: string, namespace: string) => void;
@@ -1104,66 +1060,6 @@ export interface HostElement extends HTMLElement {
1104
1060
  ['s-p']?: Promise<void>[];
1105
1061
  componentOnReady?: () => Promise<this>;
1106
1062
  }
1107
- export interface InMemoryFileSystem {
1108
- sys?: CompilerSystem;
1109
- accessData(filePath: string): Promise<{
1110
- exists: boolean;
1111
- isDirectory: boolean;
1112
- isFile: boolean;
1113
- }>;
1114
- access(filePath: string): Promise<boolean>;
1115
- /**
1116
- * Synchronous!!! Do not use!!!
1117
- * (Only typescript transpiling is allowed to use)
1118
- * @param filePath
1119
- */
1120
- accessSync(filePath: string): boolean;
1121
- copyFile(srcFile: string, dest: string): Promise<void>;
1122
- emptyDirs(dirPaths: string[]): Promise<void>;
1123
- readdir(dirPath: string, opts?: FsReaddirOptions): Promise<FsReaddirItem[]>;
1124
- readFile(filePath: string, opts?: FsReadOptions): Promise<string>;
1125
- /**
1126
- * Synchronous!!! Do not use!!!
1127
- * (Only typescript transpiling is allowed to use)
1128
- * @param filePath
1129
- */
1130
- readFileSync(filePath: string, opts?: FsReadOptions): string;
1131
- remove(itemPath: string): Promise<void>;
1132
- stat(itemPath: string): Promise<{
1133
- isFile: boolean;
1134
- isDirectory: boolean;
1135
- }>;
1136
- /**
1137
- * Synchronous!!! Do not use!!!
1138
- * (Only typescript transpiling is allowed to use)
1139
- * @param itemPath
1140
- */
1141
- statSync(itemPath: string): {
1142
- exists: boolean;
1143
- isFile: boolean;
1144
- isDirectory: boolean;
1145
- };
1146
- writeFile(filePath: string, content: string, opts?: FsWriteOptions): Promise<FsWriteResults>;
1147
- writeFiles(files: {
1148
- [filePath: string]: string;
1149
- } | Map<string, String>, opts?: FsWriteOptions): Promise<FsWriteResults[]>;
1150
- commit(): Promise<{
1151
- filesWritten: string[];
1152
- filesDeleted: string[];
1153
- filesCopied: string[][];
1154
- dirsDeleted: string[];
1155
- dirsAdded: string[];
1156
- }>;
1157
- cancelDeleteFilesFromDisk(filePaths: string[]): void;
1158
- cancelDeleteDirectoriesFromDisk(filePaths: string[]): void;
1159
- clearDirCache(dirPath: string): void;
1160
- clearFileCache(filePath: string): void;
1161
- getItem(itemPath: string): FsItem;
1162
- getBuildOutputs(): BuildOutput[];
1163
- clearCache(): void;
1164
- keys(): string[];
1165
- getMemoryStats(): string;
1166
- }
1167
1063
  export interface HydrateResults {
1168
1064
  buildId: string;
1169
1065
  diagnostics: Diagnostic[];
@@ -372,7 +372,7 @@ declare type RequireFields<T, K extends keyof T> = T & {
372
372
  /**
373
373
  * Fields in {@link Config} to make required for {@link ValidatedConfig}
374
374
  */
375
- declare type StrictConfigFields = 'flags' | 'logger' | 'outputTargets' | 'sys';
375
+ declare type StrictConfigFields = 'flags' | 'logger' | 'outputTargets' | 'rootDir' | 'sys' | 'testing';
376
376
  /**
377
377
  * A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
378
378
  * When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
@@ -1698,6 +1698,27 @@ export interface OutputTargetDist extends OutputTargetBase {
1698
1698
  buildDir?: string;
1699
1699
  dir?: string;
1700
1700
  collectionDir?: string | null;
1701
+ /**
1702
+ * When `true` this flag will transform aliased import paths defined in
1703
+ * a project's `tsconfig.json` to relative import paths in the compiled output's
1704
+ * `dist-collection` bundle if it is generated (i.e. `collectionDir` is set).
1705
+ *
1706
+ * Paths will be left in aliased format if `false` or `undefined`.
1707
+ *
1708
+ * @example
1709
+ * // tsconfig.json
1710
+ * {
1711
+ * paths: {
1712
+ * "@utils/*": ['/src/utils/*']
1713
+ * }
1714
+ * }
1715
+ *
1716
+ * // Source file
1717
+ * import * as dateUtils from '@utils/date-utils';
1718
+ * // Output file
1719
+ * import * as dateUtils from '../utils/date-utils';
1720
+ */
1721
+ transformAliasedImportPathsInCollection?: boolean | null;
1701
1722
  typesDir?: string;
1702
1723
  esmLoaderPath?: string;
1703
1724
  copy?: CopyTask[];
@@ -1709,6 +1730,26 @@ export interface OutputTargetDistCollection extends OutputTargetBase {
1709
1730
  empty?: boolean;
1710
1731
  dir: string;
1711
1732
  collectionDir: string;
1733
+ /**
1734
+ * When `true` this flag will transform aliased import paths defined in
1735
+ * a project's `tsconfig.json` to relative import paths in the compiled output.
1736
+ *
1737
+ * Paths will be left in aliased format if `false` or `undefined`.
1738
+ *
1739
+ * @example
1740
+ * // tsconfig.json
1741
+ * {
1742
+ * paths: {
1743
+ * "@utils/*": ['/src/utils/*']
1744
+ * }
1745
+ * }
1746
+ *
1747
+ * // Source file
1748
+ * import * as dateUtils from '@utils/date-utils';
1749
+ * // Output file
1750
+ * import * as dateUtils from '../utils/date-utils';
1751
+ */
1752
+ transformAliasedImportPaths?: boolean | null;
1712
1753
  }
1713
1754
  export interface OutputTargetDistTypes extends OutputTargetBase {
1714
1755
  type: 'dist-types';
@@ -2134,13 +2175,6 @@ export interface FsStats {
2134
2175
  ctime: Date;
2135
2176
  birthtime: Date;
2136
2177
  }
2137
- export interface FsWriteOptions {
2138
- inMemoryOnly?: boolean;
2139
- clearFileCache?: boolean;
2140
- immediateWrite?: boolean;
2141
- useCache?: boolean;
2142
- outputTargetType?: string;
2143
- }
2144
2178
  export interface Compiler {
2145
2179
  build(): Promise<CompilerBuildResults>;
2146
2180
  createWatcher(): Promise<CompilerWatcher>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "2.17.2",
3
+ "version": "2.18.0",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true