@arcgis/codemod 6.0.0-next.11 → 6.0.0-next.13

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.
@@ -1,20 +1,23 @@
1
- import { Project as d } from "ts-morph";
2
- import { g as t, c as p, i as a } from "./cli.js";
3
- import { log as m } from "@arcgis/toolkit/log";
4
- import { path as g } from "@arcgis/node-toolkit/path";
1
+ import { Project as p } from "ts-morph";
2
+ import { g as t, c as a, i as m } from "./cli.js";
3
+ import { log as g } from "@arcgis/toolkit/log";
4
+ import { path as u } from "@arcgis/node-toolkit/path";
5
5
  import { styleText as n } from "node:util";
6
- function y(e, l = !0) {
6
+ function S(e, l = !0, f) {
7
7
  if (t.project !== void 0)
8
8
  throw Error(
9
9
  "A different ts-morph Project is already in use. Dispose of it before creating a new one. Example: using project = createProjectInstance(...)"
10
10
  );
11
- const s = t.codemod.meta.needsTypeInformation, i = new d({
11
+ const s = t.codemod.meta.needsTypeInformation, i = new p({
12
12
  // If tsconfig is missing, or project is untyped, use a permissive and
13
13
  // compatible default config
14
- compilerOptions: e.typeScriptConfig?.compilerOptions ?? {
15
- ...p,
16
- // Read types from JSDoc annotations if present
17
- checkJs: s
14
+ compilerOptions: {
15
+ ...e.typeScriptConfig?.compilerOptions ?? {
16
+ ...a,
17
+ // Read types from JSDoc annotations if present
18
+ checkJs: s
19
+ },
20
+ ...f
18
21
  },
19
22
  // We take care of reading the config file
20
23
  tsConfigFilePath: void 0,
@@ -23,13 +26,13 @@ function y(e, l = !0) {
23
26
  // We call this manually if needed below.
24
27
  skipFileDependencyResolution: !0,
25
28
  skipLoadingLibFiles: !s
26
- }), f = e.filePaths.filter(a).flatMap((o) => {
29
+ }), d = e.filePaths.filter(m).flatMap((o) => {
27
30
  const c = i.addSourceFileAtPathIfExists(o);
28
31
  return c === void 0 ? [] : [c];
29
32
  });
30
33
  if (s && i.resolveSourceFileDependencies(), l) {
31
- const o = g.relative(process.cwd(), e.cwd);
32
- process.stdout.write(""), m(
34
+ const o = u.relative(process.cwd(), e.cwd);
35
+ process.stdout.write(""), g(
33
36
  "info",
34
37
  n("blue", o === "" ? process.cwd() : o),
35
38
  `Running the codemod on ${n("blue", String(e.filePaths.length))} file${e.filePaths.length !== 1 ? "s" : ""}${e.packageJson?.contents.name === void 0 ? "" : ` from ${n("blue", e.packageJson.contents.name)}`}`
@@ -41,11 +44,11 @@ function y(e, l = !0) {
41
44
  },
42
45
  projectData: e,
43
46
  // Resolved dependencies support type checking but are not codemod targets.
44
- getCodemodFiles: () => f,
47
+ getCodemodFiles: () => d,
45
48
  tsMorph: i
46
49
  };
47
50
  return t.project = r, r;
48
51
  }
49
52
  export {
50
- y as c
53
+ S as c
51
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/codemod",
3
- "version": "6.0.0-next.11",
3
+ "version": "6.0.0-next.13",
4
4
  "description": "A codemod toolkit for updating and modernizing ArcGIS Maps SDK for JavaScript codebases.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,11 +11,12 @@
11
11
  ],
12
12
  "license": "SEE LICENSE IN LICENSE.md",
13
13
  "dependencies": {
14
- "@arcgis/api-extractor": "6.0.0-next.11",
15
- "@arcgis/node-toolkit": "6.0.0-next.11",
16
- "@arcgis/toolkit": "6.0.0-next.11",
14
+ "@arcgis/api-extractor": "6.0.0-next.13",
15
+ "@arcgis/node-toolkit": "6.0.0-next.13",
16
+ "@arcgis/toolkit": "6.0.0-next.13",
17
17
  "@commander-js/extra-typings": "^15.0.0",
18
18
  "commander": "^15.0.0",
19
+ "semver": "^7.7.3",
19
20
  "tinyglobby": "~0.2.17",
20
21
  "ts-morph": "^28.0.0",
21
22
  "tslib": "^2.8.1",