Skip to content

Commit

Permalink
"Migrate" to TS 4.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Heiner committed May 2, 2022
1 parent 551f1a1 commit 6d038da
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react": "^16.12.0",
"rimraf": "^3.0.0",
"ts-jest": "^26.3.0",
"typescript": "4.2.4"
"typescript": "4.6.2"
},
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-migrate-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"gitHead": "7acf6067f15c9bb367cda9c47fcfb4203dcc54f3",
"devDependencies": {
"@ts-morph/bootstrap": "^0.9.1",
"@ts-morph/bootstrap": "^0.13.0",
"@types/json-schema": "^7.0.7",
"jest": "26.6.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ function getWithDefaultPropsImport() {
false,
undefined,
ts.factory.createNamedImports([
// @ts-expect-error Ignore this error because I'm not using this plugin.
ts.factory.createImportSpecifier(
undefined,
ts.factory.createIdentifier('WithDefaultProps'),
Expand Down
1 change: 1 addition & 0 deletions packages/ts-migrate-plugins/src/plugins/react-shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const reactShapePlugin: Plugin<Options> = {
undefined,
false,
ts.factory.createNamedExports([
// @ts-expect-error Ignore this error because I'm not using this plugin.
ts.factory.createExportSpecifier(undefined, ts.factory.createIdentifier(shapeName)),
]),
);
Expand Down
3 changes: 3 additions & 0 deletions packages/ts-migrate-plugins/src/plugins/utils/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export function updateImports(
? importClause.namedBindings.elements
: []),
...namedToAdd.map((cur) =>
// @ts-expect-error I'm not sure I'm using this
ts.factory.createImportSpecifier(
undefined,
ts.factory.createIdentifier(cur.namedImport),
Expand All @@ -179,6 +180,7 @@ export function updateImports(
}

if (numImports > 0) {
// @ts-expect-error I'm not sure I'm using this
const upImpDec = ts.factory.updateImportDeclaration(
importDeclaration,
importDeclaration.decorators,
Expand Down Expand Up @@ -225,6 +227,7 @@ export function updateImports(
namedToAdd.length > 0
? ts.factory.createNamedImports(
namedToAdd.map((cur) =>
// @ts-expect-error I'm not sure I'm using this
ts.factory.createImportSpecifier(
undefined,
ts.factory.createIdentifier(cur.namedImport),
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-migrate-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"homepage": "https://github.com/airbnb/ts-migrate#readme",
"license": "MIT",
"dependencies": {
"@ts-morph/bootstrap": "^0.9.1",
"@ts-morph/bootstrap": "^0.13.0",
"pretty-ms": "^7.0.1",
"updatable-log": "^0.2.0"
},
Expand Down
85 changes: 62 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2546,21 +2546,22 @@
dependencies:
"@sinonjs/commons" "^1.7.0"

"@ts-morph/bootstrap@^0.9.1":
version "0.9.1"
resolved "https://registry.yarnpkg.com/@ts-morph/bootstrap/-/bootstrap-0.9.1.tgz#4761cac8d9e5c7d2d7cdb120f6dda027c2b831cd"
integrity sha512-u3F2vhLm48e6lZUIf9Gj41OXCzAr62avbWdlMZ9K1JCH//XuAgr2u3c+2usGOOIXBaP83LshBTzDgw/tb9tSzg==
"@ts-morph/bootstrap@^0.13.0":
version "0.13.0"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/@ts-morph/bootstrap/-/bootstrap-0.13.0.tgz#f08f3f3c4c930c79275eb2be40196b8b04956902"
integrity sha512-pvzBE1ub6T+JZqqCzF+bHwM8LsT0T0tAwrYTaNOX9pKEJamzjQzg2owWcQTLeY3dXK0gIQpNKN/EDdY7tQmobQ==
dependencies:
"@ts-morph/common" "~0.9.0"
"@ts-morph/common" "~0.13.0"

"@ts-morph/common@~0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.9.0.tgz#a306355bad82cff22a1881f7f2f2c710bbb4d69d"
integrity sha512-yPcW6koNVK1hVKUu+KhPzhfgMb0uwzr2FewF+q8kxLerl0b+YZwmjvFMU2qbIawytIHT2VBI4bi+C09EFPB4aw==
"@ts-morph/common@~0.13.0":
version "0.13.0"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/@ts-morph/common/-/common-0.13.0.tgz#77dea1565baaf002d1bc2c20e05d1fb3349008a9"
integrity sha512-fEJ6j7Cu8yiWjA4UmybOBH9Efgb/64ZTWuvCF4KysGu4xz8ettfyaqFt8WZ1btCxXsGZJjZ2/3svOF6rL+UFdQ==
dependencies:
fast-glob "^3.2.5"
minimatch "^3.0.4"
fast-glob "^3.2.11"
minimatch "^5.0.1"
mkdirp "^1.0.4"
path-browserify "^1.0.1"

"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7":
version "7.1.9"
Expand Down Expand Up @@ -3377,6 +3378,13 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"

brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"

braces@^2.3.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
Expand All @@ -3393,7 +3401,7 @@ braces@^2.3.1:
split-string "^3.0.2"
to-regex "^3.0.1"

braces@^3.0.1:
braces@^3.0.1, braces@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
Expand Down Expand Up @@ -4836,17 +4844,16 @@ fast-glob@^3.1.1:
micromatch "^4.0.2"
picomatch "^2.2.1"

fast-glob@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661"
integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==
fast-glob@^3.2.11:
version "3.2.11"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.0"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.2"
picomatch "^2.2.1"
micromatch "^4.0.4"

fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
version "2.1.0"
Expand Down Expand Up @@ -5225,6 +5232,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0:
dependencies:
is-glob "^4.0.1"

glob-parent@^5.1.2:
version "5.1.2"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"

glob-to-regexp@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
Expand Down Expand Up @@ -7315,6 +7329,14 @@ micromatch@^4.0.2:
braces "^3.0.1"
picomatch "^2.0.5"

micromatch@^4.0.4:
version "4.0.5"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
dependencies:
braces "^3.0.2"
picomatch "^2.3.1"

mime-db@1.44.0:
version "1.44.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
Expand Down Expand Up @@ -7349,6 +7371,13 @@ minimatch@^3.0.2, minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"

minimatch@^5.0.1:
version "5.0.1"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b"
integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==
dependencies:
brace-expansion "^2.0.1"

minimist-options@4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
Expand Down Expand Up @@ -8065,6 +8094,11 @@ pascalcase@^0.1.1:
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=

path-browserify@^1.0.1:
version "1.0.1"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==

path-dirname@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
Expand Down Expand Up @@ -8145,6 +8179,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==

picomatch@^2.3.1:
version "2.3.1"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
Expand Down Expand Up @@ -9778,10 +9817,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
typescript@4.6.2:
version "4.6.2"
resolved "https://artifacts.netflix.net/api/npm/npm-netflix/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==

uglify-js@^3.1.4:
version "3.13.5"
Expand Down

0 comments on commit 6d038da

Please sign in to comment.