Skip to content

Commit

Permalink
tools: fix scripts - use run-time-error instead of run-time-error-cjs
Browse files Browse the repository at this point in the history
1. The `-cjs` version of the package was put into place because in the
production packages we needed it to be able to import the dependency
despite us not using ESM just yet.
2. We did a blanket search and replace at the time which seemed like a
good idea but turns out it wasn't because there are some tooling scripts
(the ones in this diff) that are already using ESM and for those the
-cjs flavored package started breaking the code.
3. So this change is just a partial/selective/surgical revert of the
earlier project-wide migratin from run-time-error to run-time-error-cjs.

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Mar 12, 2024
1 parent f3974d2 commit 1d11d6c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tools/bump-openapi-spec-dep-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import fs from "fs-extra";
import { globby, Options as GlobbyOptions } from "globby";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";
import prettier from "prettier";
import { OpenAPIV3_1 } from "openapi-types";
import { isValidSemVer } from "semver-parser";
Expand Down
2 changes: 1 addition & 1 deletion tools/create-production-only-archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fileURLToPath } from "url";
import { deleteAsync } from "del";
import fs from "fs-extra";
import { globby, Options as GlobbyOptions } from "globby";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import { simpleGit, SimpleGit, SimpleGitOptions } from "simple-git";
Expand Down
2 changes: 1 addition & 1 deletion tools/generate-sbom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { promisify } from "util";
import { exec, ExecOptions } from "child_process";
import fs from "fs-extra";
import { globby, Options as GlobbyOptions } from "globby";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";
import fastSafeStringify from "fast-safe-stringify";
import { INpmListDependencyV1, npmList } from "./npm-list";

Expand Down
2 changes: 1 addition & 1 deletion tools/get-latest-sem-ver-git-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from "path";
import { fileURLToPath } from "url"
import { simpleGit, SimpleGit, SimpleGitOptions } from "simple-git";
import { compareSemVer, isValidSemVer } from "semver-parser";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";

const TAG = "[tools/get-latest-sem-ver-git-tag.ts]";

Expand Down
2 changes: 1 addition & 1 deletion tools/npm-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ExecOptions, exec } from "child_process";
import { promisify } from "util";

import fastSafeStringify from "fast-safe-stringify";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";
import { hasKey } from "./has-key";

const execAsync = promisify(exec);
Expand Down
2 changes: 1 addition & 1 deletion tools/sync-npm-deps-to-tsc-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from "path";
import JSON5 from "json5";
import fs from "fs-extra";
import { globby, Options as GlobbyOptions } from "globby";
import { RuntimeError } from "run-time-error-cjs";
import { RuntimeError } from "run-time-error";
import { readFile } from "fs/promises";

const __filename = fileURLToPath(import.meta.url);
Expand Down

0 comments on commit 1d11d6c

Please sign in to comment.