@arcgis/codemod 5.2.0-next.11 → 5.2.0-next.110
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.
- package/LICENSE.md +4 -2
- package/README.md +42 -7
- package/dist/actions-CQZGPkk1.js +402 -0
- package/dist/cli-BLMaWpqf.js +269 -0
- package/dist/cli.js +2 -2
- package/dist/codemod--z_92lWI.js +417 -0
- package/dist/codemod-BALsil-0.js +74 -0
- package/dist/codemod-CtDiL__8.js +240 -0
- package/dist/{codemod-Dlzeg_NS.js → codemod-DKND2-mc.js} +3 -3
- package/dist/{codemod-D7XgAzvM.js → codemod-MHr8xn-r.js} +6 -6
- package/dist/codemod-ZwlO-Y4a.js +311 -0
- package/dist/codemod-v6MLU8Qq.js +140 -0
- package/dist/{useProjectInstance-ByvP74ku.js → useProjectInstance-Cs8LP18f.js} +13 -16
- package/package.json +11 -9
- package/dist/actions-BanrZtvC.js +0 -354
- package/dist/cli-BU99JSgL.js +0 -262
- package/dist/codemod-DeVcvUGc.js +0 -157
package/dist/codemod-DeVcvUGc.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
var m = (o, i) => (i = Symbol[o]) ? i : /* @__PURE__ */ Symbol.for("Symbol." + o), d = (o) => {
|
|
2
|
-
throw TypeError(o);
|
|
3
|
-
};
|
|
4
|
-
var p = (o, i, r) => {
|
|
5
|
-
if (i != null) {
|
|
6
|
-
typeof i != "object" && typeof i != "function" && d("Object expected");
|
|
7
|
-
var a, t;
|
|
8
|
-
r && (a = i[m("asyncDispose")]), a === void 0 && (a = i[m("dispose")], r && (t = a)), typeof a != "function" && d("Object not disposable"), t && (a = function() {
|
|
9
|
-
try {
|
|
10
|
-
t.call(this);
|
|
11
|
-
} catch (s) {
|
|
12
|
-
return Promise.reject(s);
|
|
13
|
-
}
|
|
14
|
-
}), o.push([r, a, i]);
|
|
15
|
-
} else r && o.push([r]);
|
|
16
|
-
return i;
|
|
17
|
-
}, f = (o, i, r) => {
|
|
18
|
-
var a = typeof SuppressedError == "function" ? SuppressedError : function(e, n, c, l) {
|
|
19
|
-
return l = Error(c), l.name = "SuppressedError", l.error = e, l.suppressed = n, l;
|
|
20
|
-
}, t = (e) => i = r ? new a(e, i, "An error was suppressed during disposal") : (r = !0, e), s = (e) => {
|
|
21
|
-
for (; e = o.pop(); )
|
|
22
|
-
try {
|
|
23
|
-
var n = e[1] && e[1].call(e[2]);
|
|
24
|
-
if (e[0]) return Promise.resolve(n).then(s, (c) => (t(c), s()));
|
|
25
|
-
} catch (c) {
|
|
26
|
-
t(c);
|
|
27
|
-
}
|
|
28
|
-
if (r) throw i;
|
|
29
|
-
};
|
|
30
|
-
return s();
|
|
31
|
-
};
|
|
32
|
-
import { f as k, p as u } from "./actions-BanrZtvC.js";
|
|
33
|
-
import { log as g } from "@arcgis/toolkit/log";
|
|
34
|
-
import { writeFile as E } from "node:fs/promises";
|
|
35
|
-
import { c as b } from "./useProjectInstance-ByvP74ku.js";
|
|
36
|
-
import { p as h, g as y } from "./cli-BU99JSgL.js";
|
|
37
|
-
async function L(o, i) {
|
|
38
|
-
const r = /* @__PURE__ */ new Set();
|
|
39
|
-
for (const a of o) {
|
|
40
|
-
const t = a.packageJson;
|
|
41
|
-
if (t === void 0 || r.has(t.filePath))
|
|
42
|
-
continue;
|
|
43
|
-
r.add(t.filePath);
|
|
44
|
-
const s = t.contents;
|
|
45
|
-
try {
|
|
46
|
-
const e = await i(s, t.filePath);
|
|
47
|
-
s !== e && await E(t.filePath, `${JSON.stringify(e, null, 2)}
|
|
48
|
-
`, "utf8");
|
|
49
|
-
} catch (e) {
|
|
50
|
-
process.exitCode = 1, g(
|
|
51
|
-
"error",
|
|
52
|
-
k(t.filePath),
|
|
53
|
-
`Error occurred while migrating: ${String(e)}`,
|
|
54
|
-
typeof e == "object" && e !== null && "stack" in e ? { detail: { stack: e.stack } } : void 0
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function P(o, i) {
|
|
60
|
-
for (const r of ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]) {
|
|
61
|
-
const a = o[r];
|
|
62
|
-
if (a) {
|
|
63
|
-
const t = i(a, r);
|
|
64
|
-
t !== a && (o = { ...o, [r]: t });
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return o;
|
|
68
|
-
}
|
|
69
|
-
const F = {
|
|
70
|
-
meta: {
|
|
71
|
-
needsTypeInformation: !1
|
|
72
|
-
},
|
|
73
|
-
async run(o) {
|
|
74
|
-
await L(
|
|
75
|
-
o,
|
|
76
|
-
(s) => P(
|
|
77
|
-
s,
|
|
78
|
-
(e) => e["@arcgis/components-utils"] ? {
|
|
79
|
-
...e,
|
|
80
|
-
"@arcgis/components-utils": void 0,
|
|
81
|
-
"@arcgis/toolkit": e["@arcgis/components-utils"]
|
|
82
|
-
} : e
|
|
83
|
-
)
|
|
84
|
-
);
|
|
85
|
-
for (const s of o) {
|
|
86
|
-
var i = [];
|
|
87
|
-
try {
|
|
88
|
-
const e = p(i, b(s));
|
|
89
|
-
for (const n of e.getCodemodFiles())
|
|
90
|
-
u(n, {
|
|
91
|
-
"@arcgis/components-utils": {
|
|
92
|
-
// Deprecated
|
|
93
|
-
setFocusOnElement: [{ do: "deprecate" }, { do: "rename", specifier: "@arcgis/toolkit/dom" }],
|
|
94
|
-
setValuesInString: [{ do: "deprecate" }, { do: "rename", specifier: "@arcgis/toolkit/string" }],
|
|
95
|
-
IHandle: [{ do: "deprecate" }, { do: "rename", specifier: "@arcgis/toolkit/type" }],
|
|
96
|
-
Deferred: [{ do: "deprecate" }, { do: "rename", specifier: "@arcgis/toolkit/promise" }],
|
|
97
|
-
// Renamed
|
|
98
|
-
addLTRMark: { do: "rename", specifier: "@arcgis/toolkit/string", name: "addLtrMark" },
|
|
99
|
-
getElementTheme: { do: "rename", specifier: "@arcgis/toolkit/dom", name: "unsafeGetCalciteModeName" },
|
|
100
|
-
getElementDir: { do: "rename", specifier: "@arcgis/toolkit/dom", name: "unsafeGetElementDirection" },
|
|
101
|
-
unsafeGetModeName: { do: "rename", specifier: "@arcgis/toolkit/dom", name: "unsafeGetCalciteModeName" },
|
|
102
|
-
getElementLocales: { do: "rename", specifier: "@arcgis/toolkit/intl", name: "getElementLocale" },
|
|
103
|
-
LocaleObserver: { do: "rename", specifier: "@arcgis/toolkit/intl", name: "LocaleObserverResult" },
|
|
104
|
-
Nil: { do: "rename", specifier: "@arcgis/toolkit/type", name: "nil" },
|
|
105
|
-
closestElement: { do: "rename", specifier: "@arcgis/toolkit/dom", name: "getClosestElement" },
|
|
106
|
-
extractMinorVersion: { do: "rename", specifier: "@arcgis/toolkit/string", name: "getMinorVersion" },
|
|
107
|
-
isURL: { do: "rename", specifier: "@arcgis/toolkit/string", name: "isUrl" },
|
|
108
|
-
mappedFind: { do: "rename", specifier: "@arcgis/toolkit/array" },
|
|
109
|
-
classes: { do: "rename", specifier: "@arcgis/toolkit/dom" },
|
|
110
|
-
// Relocated
|
|
111
|
-
observeAncestorsMutation: { do: "rename", specifier: "@arcgis/toolkit/dom" },
|
|
112
|
-
getElementAttribute: { do: "rename", specifier: "@arcgis/toolkit/dom" },
|
|
113
|
-
FocusableElement: { do: "rename", specifier: "@arcgis/toolkit/dom" },
|
|
114
|
-
focusElement: { do: "rename", specifier: "@arcgis/toolkit/dom" },
|
|
115
|
-
devToolsAwareTimeout: { do: "rename", specifier: "@arcgis/toolkit/promise" },
|
|
116
|
-
isEsriInternalEnv: { do: "rename", specifier: "@arcgis/toolkit/error" },
|
|
117
|
-
safeCall: { do: "rename", specifier: "@arcgis/toolkit/error" },
|
|
118
|
-
safeAsyncCall: { do: "rename", specifier: "@arcgis/toolkit/error" },
|
|
119
|
-
generateGuid: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
120
|
-
getPreamble: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
121
|
-
quoteString: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
122
|
-
createFilterExpression: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
123
|
-
kebabToPascal: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
124
|
-
camelToKebab: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
125
|
-
camelToHuman: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
126
|
-
capitalize: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
127
|
-
uncapitalize: { do: "rename", specifier: "@arcgis/toolkit/string" },
|
|
128
|
-
GenericT9nStrings: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
129
|
-
supportedLocales: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
130
|
-
SupportedLocale: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
131
|
-
defaultLocale: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
132
|
-
fetchT9nStringsBundle: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
133
|
-
normalizeLocale: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
134
|
-
startLocaleObserver: { do: "rename", specifier: "@arcgis/toolkit/intl" },
|
|
135
|
-
isNotNull: { do: "rename", specifier: "@arcgis/toolkit/predicate" },
|
|
136
|
-
isNotUndefined: { do: "rename", specifier: "@arcgis/toolkit/predicate" },
|
|
137
|
-
debounce: { do: "rename", specifier: "@arcgis/toolkit/function" },
|
|
138
|
-
identity: { do: "rename", specifier: "@arcgis/toolkit/function" },
|
|
139
|
-
hasSameOrigin: { do: "rename", specifier: "@arcgis/toolkit/url" }
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
} catch (r) {
|
|
143
|
-
var a = r, t = !0;
|
|
144
|
-
} finally {
|
|
145
|
-
f(i, a, t);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
h(), g(
|
|
149
|
-
"info",
|
|
150
|
-
y.codemodName,
|
|
151
|
-
"Next step: run npm install/pnpm install/yarn install to get @arcgis/toolkit package installed."
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
export {
|
|
156
|
-
F as codemod
|
|
157
|
-
};
|