@stencil/core 2.14.1 → 2.15.1

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 (41) hide show
  1. package/bin/stencil +19 -13
  2. package/cli/index.cjs +72 -55
  3. package/cli/index.js +72 -55
  4. package/cli/package.json +1 -1
  5. package/compiler/package.json +1 -1
  6. package/compiler/stencil.js +248 -57
  7. package/compiler/stencil.min.js +2 -2
  8. package/dependencies.json +1 -1
  9. package/dev-server/client/index.js +3 -3
  10. package/dev-server/client/package.json +1 -1
  11. package/dev-server/connector.html +3 -3
  12. package/dev-server/index.js +1 -1
  13. package/dev-server/package.json +1 -1
  14. package/dev-server/server-process.js +2 -2
  15. package/internal/app-data/package.json +1 -1
  16. package/internal/client/css-shim.js +2 -2
  17. package/internal/client/dom.js +1 -1
  18. package/internal/client/index.js +1 -1
  19. package/internal/client/package.json +1 -1
  20. package/internal/client/patch-browser.js +1 -1
  21. package/internal/client/patch-esm.js +1 -1
  22. package/internal/client/polyfills/css-shim.js +1 -1
  23. package/internal/client/shadow-css.js +1 -1
  24. package/internal/hydrate/package.json +1 -1
  25. package/internal/hydrate/runner.d.ts +1 -1
  26. package/internal/hydrate/runner.js +1 -1
  27. package/internal/package.json +1 -1
  28. package/internal/stencil-public-compiler.d.ts +18 -14
  29. package/internal/testing/package.json +1 -1
  30. package/mock-doc/index.cjs +13 -3
  31. package/mock-doc/index.d.ts +4 -0
  32. package/mock-doc/index.js +13 -3
  33. package/mock-doc/package.json +1 -1
  34. package/package.json +7 -5
  35. package/screenshot/package.json +1 -1
  36. package/sys/node/index.js +11 -11
  37. package/sys/node/node-fetch.js +1 -1
  38. package/sys/node/package.json +1 -1
  39. package/sys/node/worker.js +1 -1
  40. package/testing/index.js +8 -8
  41. package/testing/package.json +1 -1
@@ -655,7 +655,7 @@ const templateWindows = new Map, createHydrateBuildId = () => {
655
655
  }, commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, getCssSelectors = e => {
656
656
  SELECTORS.all.length = SELECTORS.tags.length = SELECTORS.classNames.length = SELECTORS.ids.length = SELECTORS.attrs.length = 0;
657
657
  const t = (e = e.replace(/\./g, " .").replace(/\#/g, " #").replace(/\[/g, " [").replace(/\>/g, " > ").replace(/\+/g, " + ").replace(/\~/g, " ~ ").replace(/\*/g, " * ").replace(/\:not\((.*?)\)/g, " ")).split(" ");
658
- for (let e = 0, r = t.length; e < r; e++) t[e] = t[e].split(":")[0], 0 !== t[e].length && ("." === t[e].charAt(0) ? SELECTORS.classNames.push(t[e].substr(1)) : "#" === t[e].charAt(0) ? SELECTORS.ids.push(t[e].substr(1)) : "[" === t[e].charAt(0) ? (t[e] = t[e].substr(1).split("=")[0].split("]")[0].trim(),
658
+ for (let e = 0, r = t.length; e < r; e++) t[e] = t[e].split(":")[0], 0 !== t[e].length && ("." === t[e].charAt(0) ? SELECTORS.classNames.push(t[e].slice(1)) : "#" === t[e].charAt(0) ? SELECTORS.ids.push(t[e].slice(1)) : "[" === t[e].charAt(0) ? (t[e] = t[e].slice(1).split("=")[0].split("]")[0].trim(),
659
659
  SELECTORS.attrs.push(t[e].toLowerCase())) : /[a-z]/g.test(t[e].charAt(0)) && SELECTORS.tags.push(t[e].toLowerCase()));
660
660
  return SELECTORS.classNames = SELECTORS.classNames.sort(((e, t) => e.length < t.length ? -1 : e.length > t.length ? 1 : 0)),
661
661
  SELECTORS;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "2.14.1",
3
+ "version": "2.15.1",
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",
@@ -43,7 +43,7 @@ export interface StencilConfig {
43
43
  * However, it's still common to have styles which should be "global" across all components and the website.
44
44
  * A global CSS file is often useful to set CSS Variables.
45
45
  *
46
- * Additonally, the globalStyle config can be used to precompile styles with Sass, PostCss, etc.
46
+ * Additionally, the globalStyle config can be used to precompile styles with Sass, PostCss, etc.
47
47
  * Below is an example folder structure containing a webapp's global sass file, named app.css.
48
48
  */
49
49
  globalStyle?: string;
@@ -102,7 +102,7 @@ export interface StencilConfig {
102
102
  */
103
103
  nodeResolve?: NodeResolveConfig;
104
104
  /**
105
- * Passes custom configuration down to rollup itself, not all rollup options can be overriden.
105
+ * Passes custom configuration down to rollup itself, not all rollup options can be overridden.
106
106
  */
107
107
  rollupConfig?: RollupConfig;
108
108
  /**
@@ -145,14 +145,14 @@ export interface StencilConfig {
145
145
  * The hydrated flag identifies if a component and all of its child components
146
146
  * have finished hydrating. This helps prevent any flash of unstyled content (FOUC)
147
147
  * as various components are asynchronously downloaded and rendered. By default it
148
- * will add the `hydrated` CSS class to the element. The `hydratedFlag` confg can be used
148
+ * will add the `hydrated` CSS class to the element. The `hydratedFlag` config can be used
149
149
  * to change the name of the CSS class, change it to an attribute, or change which
150
150
  * type of CSS properties and values are assigned before and after hydrating. This config
151
151
  * can also be used to not include the hydrated flag at all by setting it to `null`.
152
152
  */
153
153
  hydratedFlag?: HydratedFlag;
154
154
  /**
155
- * Ionic perfers to hide all components prior to hydration with a style tag appended
155
+ * Ionic prefers to hide all components prior to hydration with a style tag appended
156
156
  * to the head of the document containing some `visibility: hidden;` css rules.
157
157
  *
158
158
  * Disabling this will remove the style tag that sets `visibility: hidden;` on all
@@ -178,11 +178,11 @@ export interface StencilConfig {
178
178
  * - `congestionAsync`: DOM reads and writes are scheduled in the next frame to prevent layout
179
179
  * thrashing. When the app is heavily tasked and the queue becomes congested it will then
180
180
  * split the work across multiple frames to prevent blocking the main thread. However, it can
181
- * also introduce unnecesary reflows in some cases, especially during startup. `congestionAsync`
182
- * is ideal for apps running animations while also simultaniously executing intesive tasks
181
+ * also introduce unnecessary reflows in some cases, especially during startup. `congestionAsync`
182
+ * is ideal for apps running animations while also simultaneously executing intensive tasks
183
183
  * which may lock-up the main thread.
184
184
  *
185
- * - `immediate`: Makes writeTask() and readTask() callbacks to be executed syncronously. Tasks
185
+ * - `immediate`: Makes writeTask() and readTask() callbacks to be executed synchronously. Tasks
186
186
  * are not scheduled to run in the next frame, but do note there is at least one microtask.
187
187
  * The `immediate` setting is ideal for apps that do not provide long running and smooth
188
188
  * animations. Like the async setting, if the app has intensive tasks causing the main thread
@@ -229,7 +229,7 @@ export interface ConfigExtras {
229
229
  * By default, the slot polyfill does not update `appendChild()` so that it appends
230
230
  * new child nodes into the correct child slot like how shadow dom works. This is an opt-in
231
231
  * polyfill for those who need it when using `element.appendChild(node)` and expecting the
232
- * child to be appended in the same location shadom dom would. This is not required for
232
+ * child to be appended in the same location shadow dom would. This is not required for
233
233
  * IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
234
234
  */
235
235
  appendChildSlotFix?: boolean;
@@ -432,7 +432,7 @@ export interface StencilDevServerConfig {
432
432
  */
433
433
  ssr?: boolean;
434
434
  /**
435
- * If the dev server fails to start up within the given timout (in milliseconds), the startup will
435
+ * If the dev server fails to start up within the given timeout (in milliseconds), the startup will
436
436
  * be canceled. Set to zero to disable the timeout. Defaults to `15000`.
437
437
  */
438
438
  startupTimeout?: number;
@@ -722,7 +722,7 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
722
722
  * Sets an approximate line width the HTML should attempt to stay within.
723
723
  * Note that this is "approximate", in that HTML may often not be able
724
724
  * to be split at an exact line width. Additionally, new lines created
725
- * is where HTML naturally already has whitespce, such as before an
725
+ * is where HTML naturally already has whitespace, such as before an
726
726
  * attribute or spaces between words. Defaults to `100`.
727
727
  */
728
728
  approximateLineWidth?: number;
@@ -823,7 +823,7 @@ export interface SitemapXmpResults {
823
823
  * build all actions the in-memory fs performed will be written to disk using this system.
824
824
  * A NodeJS based system will use APIs such as `fs` and `crypto`, and a web-based system
825
825
  * will use in-memory Maps and browser APIs. Either way, the compiler itself is unaware
826
- * of the actual platform it's being ran ontop of.
826
+ * of the actual platform it's being ran on top of.
827
827
  */
828
828
  export interface CompilerSystem {
829
829
  name: 'node' | 'in-memory';
@@ -872,7 +872,7 @@ export interface CompilerSystem {
872
872
  */
873
873
  isTTY(): boolean;
874
874
  /**
875
- * Each plaform as a different way to dynamically import modules.
875
+ * Each platform as a different way to dynamically import modules.
876
876
  */
877
877
  dynamicImport?(p: string): Promise<any>;
878
878
  /**
@@ -1553,7 +1553,7 @@ export interface TestingConfig extends JestConfig {
1553
1553
  browserSlowMo?: number;
1554
1554
  /**
1555
1555
  * By default, all E2E pages wait until the "load" event, this global setting can be used
1556
- * to change the default `waitUntil` behaviour.
1556
+ * to change the default `waitUntil` behavior.
1557
1557
  */
1558
1558
  browserWaitUntil?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
1559
1559
  /**
@@ -1763,6 +1763,10 @@ export interface OutputTargetDistCustomElements extends OutputTargetBaseNext {
1763
1763
  * children, etc. Users of this flag should be aware that enabling this functionality may increase bundle size.
1764
1764
  */
1765
1765
  autoDefineCustomElements?: boolean;
1766
+ /**
1767
+ * Enables the generation of type definition files for the output target.
1768
+ */
1769
+ generateTypeDeclarations?: boolean;
1766
1770
  }
1767
1771
  export interface OutputTargetDistCustomElementsBundle extends OutputTargetBaseNext {
1768
1772
  type: 'dist-custom-elements-bundle';
@@ -1840,7 +1844,7 @@ export interface OutputTargetWww extends OutputTargetBase {
1840
1844
  baseUrl?: string;
1841
1845
  /**
1842
1846
  * By default, stencil will include all the polyfills required by legacy browsers in the ES5 build.
1843
- * If it's `false`, stencil will not emit this polyfills anymore and it's your responsability to provide them before
1847
+ * If it's `false`, stencil will not emit this polyfills anymore and it's your responsibility to provide them before
1844
1848
  * stencil initializes.
1845
1849
  */
1846
1850
  polyfills?: boolean;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "2.14.1",
3
+ "version": "2.15.1",
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v2.14.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v2.15.1 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
@@ -381,7 +381,7 @@ function toDataAttribute(str) {
381
381
  .toLowerCase());
382
382
  }
383
383
  function dashToPascalCase(str) {
384
- str = String(str).substr(5);
384
+ str = String(str).slice(5);
385
385
  return str
386
386
  .split('-')
387
387
  .map((segment, index) => {
@@ -585,7 +585,7 @@ function cssCaseToJsCase(str) {
585
585
  .split('-')
586
586
  .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
587
587
  .join('');
588
- str = str.substr(0, 1).toLowerCase() + str.substr(1);
588
+ str = str.slice(0, 1).toLowerCase() + str.slice(1);
589
589
  }
590
590
  return str;
591
591
  }
@@ -3165,6 +3165,15 @@ class MockResponse {
3165
3165
  }
3166
3166
  }
3167
3167
 
3168
+ class MockDOMParser {
3169
+ parseFromString(htmlToParse, mimeType) {
3170
+ if (mimeType !== 'text/html') {
3171
+ console.error('XML parsing not implemented yet, continuing as html');
3172
+ }
3173
+ return parseHtmlToDocument(htmlToParse);
3174
+ }
3175
+ }
3176
+
3168
3177
  function setupGlobal(gbl) {
3169
3178
  if (gbl.window == null) {
3170
3179
  const win = (gbl.window = new MockWindow());
@@ -3294,6 +3303,7 @@ const GLOBAL_CONSTRUCTORS = [
3294
3303
  ['MouseEvent', MockMouseEvent],
3295
3304
  ['Request', MockRequest],
3296
3305
  ['Response', MockResponse],
3306
+ ['DOMParser', MockDOMParser],
3297
3307
  ['HTMLAnchorElement', MockAnchorElement],
3298
3308
  ['HTMLBaseElement', MockBaseElement],
3299
3309
  ['HTMLButtonElement', MockButtonElement],
@@ -624,6 +624,10 @@ declare function parseHtmlToDocument(html: string, ownerDocument?: MockDocument)
624
624
  declare function parseHtmlToFragment(html: string, ownerDocument?: MockDocument): any;
625
625
  declare function parseDocumentUtil(ownerDocument: any, html: string): any;
626
626
  declare function parseFragmentUtil(ownerDocument: any, html: string): any;
627
+ declare type DOMParserSupportedType = 'text/html' | 'text/xml' | 'application/xml' | 'application/xhtml+xml' | 'image/svg+xml';
628
+ declare class MockDOMParser {
629
+ parseFromString(htmlToParse: string, mimeType: DOMParserSupportedType): MockDocument;
630
+ }
627
631
  /**
628
632
  * https://developer.mozilla.org/en-US/docs/Web/API/Performance
629
633
  */
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v2.14.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v2.15.1 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -378,7 +378,7 @@ function toDataAttribute(str) {
378
378
  .toLowerCase());
379
379
  }
380
380
  function dashToPascalCase(str) {
381
- str = String(str).substr(5);
381
+ str = String(str).slice(5);
382
382
  return str
383
383
  .split('-')
384
384
  .map((segment, index) => {
@@ -582,7 +582,7 @@ function cssCaseToJsCase(str) {
582
582
  .split('-')
583
583
  .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
584
584
  .join('');
585
- str = str.substr(0, 1).toLowerCase() + str.substr(1);
585
+ str = str.slice(0, 1).toLowerCase() + str.slice(1);
586
586
  }
587
587
  return str;
588
588
  }
@@ -3162,6 +3162,15 @@ class MockResponse {
3162
3162
  }
3163
3163
  }
3164
3164
 
3165
+ class MockDOMParser {
3166
+ parseFromString(htmlToParse, mimeType) {
3167
+ if (mimeType !== 'text/html') {
3168
+ console.error('XML parsing not implemented yet, continuing as html');
3169
+ }
3170
+ return parseHtmlToDocument(htmlToParse);
3171
+ }
3172
+ }
3173
+
3165
3174
  function setupGlobal(gbl) {
3166
3175
  if (gbl.window == null) {
3167
3176
  const win = (gbl.window = new MockWindow());
@@ -3291,6 +3300,7 @@ const GLOBAL_CONSTRUCTORS = [
3291
3300
  ['MouseEvent', MockMouseEvent],
3292
3301
  ['Request', MockRequest],
3293
3302
  ['Response', MockResponse],
3303
+ ['DOMParser', MockDOMParser],
3294
3304
  ['HTMLAnchorElement', MockAnchorElement],
3295
3305
  ['HTMLBaseElement', MockBaseElement],
3296
3306
  ['HTMLButtonElement', MockButtonElement],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "2.14.1",
3
+ "version": "2.15.1",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "2.14.1",
3
+ "version": "2.15.1",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -10,6 +10,8 @@
10
10
  },
11
11
  "files": [
12
12
  "!**/*.map",
13
+ "!**/*.stub.ts",
14
+ "!**/*.stub.tsx",
13
15
  "bin/",
14
16
  "cli/",
15
17
  "compiler/",
@@ -39,10 +41,10 @@
39
41
  "rollup.watch": "rollup --watch --config",
40
42
  "license": "node scripts --license",
41
43
  "prettier": "npm run prettier.base -- --write",
42
- "prettier.base": "prettier \"./{bin,scripts,src,test}/**/*.{ts,tsx,js,jsx}\"",
44
+ "prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil\"",
43
45
  "prettier.dry-run": "npm run prettier.base -- --list-different",
44
46
  "test": "jest --coverage",
45
- "test.analysis": "cd test && npm run build",
47
+ "test.analysis": "cd test && npm run analysis.build-and-analyze",
46
48
  "test.dist": "node scripts --validate-build",
47
49
  "test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
48
50
  "test.jest": "jest",
@@ -50,7 +52,7 @@
50
52
  "test.karma.prod": "cd test/karma && npm ci && npm run karma.prod",
51
53
  "test.testing": "node scripts/test/validate-testing.js",
52
54
  "test.sys.node": "echo test.sys.node",
53
- "test.prod": "npm run test.dist && npm run test.end-to-end && npm run test.jest && npm run test.karma && npm run test.sys.node && npm run test.testing",
55
+ "test.prod": "npm run test.dist && npm run test.end-to-end && npm run test.jest && npm run test.karma && npm run test.sys.node && npm run test.testing && npm run test.analysis",
54
56
  "test.watch": "jest --watch",
55
57
  "test.watch-all": "jest --watchAll --coverage"
56
58
  },
@@ -106,7 +108,7 @@
106
108
  "merge-source-map": "^1.1.0",
107
109
  "mime-db": "^1.46.0",
108
110
  "minimatch": "3.0.4",
109
- "node-fetch": "2.6.1",
111
+ "node-fetch": "2.6.7",
110
112
  "open": "8.2.1",
111
113
  "open-in-editor": "2.2.0",
112
114
  "parse5": "6.0.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "2.14.1",
3
+ "version": "2.15.1",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Node System v2.14.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System v2.15.1 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  function _interopDefaultLegacy(e) {
5
5
  return e && "object" == typeof e && "default" in e ? e : {
@@ -255,22 +255,22 @@ const fs = require("./graceful-fs.js"), path = require("path"), require$$1 = req
255
255
  const n = [], i = e => {
256
256
  if (e.length) {
257
257
  const t = new Date, r = "[" + ("0" + t.getMinutes()).slice(-2) + ":" + ("0" + t.getSeconds()).slice(-2) + "." + Math.floor(t.getMilliseconds() / 1e3 * 10) + "]";
258
- e[0] = d(r) + e[0].substr(r.length);
258
+ e[0] = d(r) + e[0].slice(r.length);
259
259
  }
260
260
  }, o = e => {
261
261
  if (e.length) {
262
262
  const t = "[ WARN ]";
263
- e[0] = h(u(t)) + e[0].substr(t.length);
263
+ e[0] = h(u(t)) + e[0].slice(t.length);
264
264
  }
265
265
  }, s = e => {
266
266
  if (e.length) {
267
267
  const t = "[ ERROR ]";
268
- e[0] = h(l(t)) + e[0].substr(t.length);
268
+ e[0] = h(l(t)) + e[0].slice(t.length);
269
269
  }
270
270
  }, a = e => {
271
271
  if (e.length) {
272
272
  const t = new Date, r = "[" + ("0" + t.getMinutes()).slice(-2) + ":" + ("0" + t.getSeconds()).slice(-2) + "." + Math.floor(t.getMilliseconds() / 1e3 * 10) + "]";
273
- e[0] = f(r) + e[0].substr(r.length);
273
+ e[0] = f(r) + e[0].slice(r.length);
274
274
  }
275
275
  }, c = (t, i) => {
276
276
  if (r) {
@@ -279,10 +279,10 @@ const fs = require("./graceful-fs.js"), path = require("path"), require$$1 = req
279
279
  }
280
280
  }, l = t => e.color(t, "red"), u = t => e.color(t, "yellow"), f = t => e.color(t, "cyan"), h = t => e.color(t, "bold"), d = t => e.color(t, "dim"), p = t => e.color(t, "bgRed"), m = e => LOG_LEVELS.indexOf(e) >= LOG_LEVELS.indexOf(t), g = (t, r, n) => {
281
281
  let i = t.length - r + n - 1;
282
- for (;t.length + INDENT$1.length > e.getColumns(); ) if (r > t.length - r + n && r > 5) t = t.substr(1),
282
+ for (;t.length + INDENT$1.length > e.getColumns(); ) if (r > t.length - r + n && r > 5) t = t.slice(1),
283
283
  r--; else {
284
284
  if (!(i > 1)) break;
285
- t = t.substr(0, t.length - 1), i--;
285
+ t = t.slice(0, -1), i--;
286
286
  }
287
287
  const o = [], s = Math.max(t.length, r + n);
288
288
  for (let e = 0; e < s; e++) {
@@ -440,7 +440,7 @@ const fs = require("./graceful-fs.js"), path = require("path"), require$$1 = req
440
440
  const t = JSON.parse(JSON.stringify(e));
441
441
  for (let e = 0; e < 100; e++) {
442
442
  if (!eachLineHasLeadingWhitespace(t)) return t;
443
- for (let e = 0; e < t.length; e++) if (t[e].text = t[e].text.substr(1), t[e].errorCharStart--,
443
+ for (let e = 0; e < t.length; e++) if (t[e].text = t[e].text.slice(1), t[e].errorCharStart--,
444
444
  !t[e].text.length) return t;
445
445
  }
446
446
  return t;
@@ -4957,7 +4957,7 @@ exports.createNodeLogger = e => {
4957
4957
  return _interopNamespace(require("readline"));
4958
4958
  }));
4959
4959
  let t = Promise.resolve();
4960
- const n = n => (n = n.substr(0, r.stdout.columns - 5) + "", t = t.then((() => new Promise((t => {
4960
+ const n = n => (n = n.substring(0, r.stdout.columns - 5) + "", t = t.then((() => new Promise((t => {
4961
4961
  e.clearLine(r.stdout, 0), e.cursorTo(r.stdout, 0, null), r.stdout.write(n, t);
4962
4962
  })))));
4963
4963
  return r.stdout.write("[?25l"), {
@@ -5378,13 +5378,13 @@ exports.createNodeLogger = e => {
5378
5378
  },
5379
5379
  generateContentHash(e, t) {
5380
5380
  let r = require$$3.createHash("sha1").update(e).digest("hex").toLowerCase();
5381
- return "number" == typeof t && (r = r.substr(0, t)), Promise.resolve(r);
5381
+ return "number" == typeof t && (r = r.slice(0, t)), Promise.resolve(r);
5382
5382
  },
5383
5383
  generateFileHash: (e, t) => new Promise(((r, n) => {
5384
5384
  const i = require$$3.createHash("sha1");
5385
5385
  fs__default.default.createReadStream(e).on("error", (e => n(e))).on("data", (e => i.update(e))).on("end", (() => {
5386
5386
  let e = i.digest("hex").toLowerCase();
5387
- "number" == typeof t && (e = e.substr(0, t)), r(e);
5387
+ "number" == typeof t && (e = e.slice(0, t)), r(e);
5388
5388
  }));
5389
5389
  })),
5390
5390
  copy: nodeCopyTasks,