@arcgis/components-build-utils 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.
@@ -0,0 +1,2 @@
1
+ import { Command } from '@commander-js/extra-typings';
2
+ export declare const registerCommand: (command: Command) => undefined;
@@ -0,0 +1,2 @@
1
+ import { Command } from '@commander-js/extra-typings';
2
+ export declare const registerCommand: (command: Command) => undefined;
@@ -0,0 +1 @@
1
+ export declare function error(...messages: unknown[]): void;
@@ -0,0 +1 @@
1
+ export declare function error(...messages: unknown[]): void;
package/dist/index.cjs CHANGED
@@ -30,7 +30,11 @@ const node_url = require("node:url");
30
30
  const posix = require("node:path/posix");
31
31
  const win32 = require("node:path/win32");
32
32
  const dts = require("vite-plugin-dts");
33
- const existsAsync = async (file) => await promises.access(file, promises.constants.F_OK).then(() => true).catch(() => false);
33
+ const existsAsync = async (file) => (
34
+ // Using un-promisified version because promises version creates exceptions
35
+ // which interferes with debugging when "Pause on caught exceptions" is enabled
36
+ await new Promise((resolve2) => node_fs.access(file, promises.constants.F_OK, (error) => resolve2(!error)))
37
+ );
34
38
  const sh = (command, cwd) => node_child_process.execSync(command.trim(), { encoding: "utf8", cwd }).trim();
35
39
  async function createFileIfNotExists(filePath, content) {
36
40
  await promises.mkdir(node_path.dirname(filePath), { recursive: true });
@@ -155,7 +159,7 @@ async function fetchPackageLocation(packageName, cwd) {
155
159
  cwd
156
160
  ).then((packageJsonLocation) => {
157
161
  if (packageJsonLocation === void 0) {
158
- throw new Error(
162
+ throw Error(
159
163
  `@arcgis/components-build-utils: Unable to resolve package.json location for "${packageName}" package. Current working directory: ${process.cwd()}`
160
164
  );
161
165
  }
package/dist/index.js CHANGED
@@ -1,12 +1,16 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { access, constants, mkdir, writeFile, readFile } from "node:fs/promises";
1
+ import { access, existsSync, readFileSync } from "node:fs";
2
+ import { constants, mkdir, writeFile, readFile } from "node:fs/promises";
3
3
  import { execSync } from "node:child_process";
4
4
  import { dirname, resolve, sep, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import posix from "node:path/posix";
7
7
  import win32 from "node:path/win32";
8
8
  import dts from "vite-plugin-dts";
9
- const existsAsync = async (file) => await access(file, constants.F_OK).then(() => true).catch(() => false);
9
+ const existsAsync = async (file) => (
10
+ // Using un-promisified version because promises version creates exceptions
11
+ // which interferes with debugging when "Pause on caught exceptions" is enabled
12
+ await new Promise((resolve2) => access(file, constants.F_OK, (error) => resolve2(!error)))
13
+ );
10
14
  const sh = (command, cwd) => execSync(command.trim(), { encoding: "utf8", cwd }).trim();
11
15
  async function createFileIfNotExists(filePath, content) {
12
16
  await mkdir(dirname(filePath), { recursive: true });
@@ -131,7 +135,7 @@ async function fetchPackageLocation(packageName, cwd) {
131
135
  cwd
132
136
  ).then((packageJsonLocation) => {
133
137
  if (packageJsonLocation === void 0) {
134
- throw new Error(
138
+ throw Error(
135
139
  `@arcgis/components-build-utils: Unable to resolve package.json location for "${packageName}" package. Current working directory: ${process.cwd()}`
136
140
  );
137
141
  }
@@ -7,9 +7,19 @@
7
7
  export type MiniPackageJson = {
8
8
  "name": string;
9
9
  "version": string;
10
+ "private"?: boolean;
11
+ "type"?: "commonjs" | "module";
12
+ "publishConfig"?: {
13
+ access?: string;
14
+ registry?: string;
15
+ };
16
+ "files"?: string[];
10
17
  "dependencies"?: Record<string, string | undefined>;
11
18
  "devDependencies"?: Record<string, string | undefined>;
12
19
  "peerDependencies"?: Record<string, string | undefined>;
20
+ "peerDependenciesMeta"?: Record<string, {
21
+ optional?: boolean;
22
+ }>;
13
23
  "css.customData"?: string[];
14
24
  "customElements"?: string;
15
25
  "html.customData"?: string[];
@@ -7,9 +7,19 @@
7
7
  export type MiniPackageJson = {
8
8
  "name": string;
9
9
  "version": string;
10
+ "private"?: boolean;
11
+ "type"?: "commonjs" | "module";
12
+ "publishConfig"?: {
13
+ access?: string;
14
+ registry?: string;
15
+ };
16
+ "files"?: string[];
10
17
  "dependencies"?: Record<string, string | undefined>;
11
18
  "devDependencies"?: Record<string, string | undefined>;
12
19
  "peerDependencies"?: Record<string, string | undefined>;
20
+ "peerDependenciesMeta"?: Record<string, {
21
+ optional?: boolean;
22
+ }>;
13
23
  "css.customData"?: string[];
14
24
  "customElements"?: string;
15
25
  "html.customData"?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/components-build-utils",
3
- "version": "4.33.0-next.105",
3
+ "version": "4.33.0-next.107",
4
4
  "description": "Collection of common internal build-time patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "type": "module",