Skip to content

Commit

Permalink
chore: update downlevel-dts config to target TS4.2 (#6471)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Feb 15, 2023
1 parent 3b063cf commit 9dbacd8
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 42 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -75,11 +75,14 @@ jspm_packages/
.DS_Store
.idea
dist
_ts3.4
*.tsbuildinfo
.watchmanconfig
.rollup.cache

# the downlevel-dts output folders
_ts3.4
_ts4.2

# Files copied as part of the build
packages/types/src/generated/**/*.ts

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -78,7 +78,7 @@
"cross-env": "^7.0.3",
"cross-fetch": "^3.1.5",
"cspell": "^6.0.0",
"downlevel-dts": ">=0.10.0",
"downlevel-dts": "^0.11.0",
"eslint": "^8.15.0",
"eslint-plugin-deprecation": "^1.3.2",
"eslint-plugin-eslint-comments": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-spec/package.json
Expand Up @@ -31,7 +31,7 @@
"scripts": {
"build": "tsc -b tsconfig.build.json && api-extractor run --local",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf .rollup.cache && rimraf coverage",
"postclean": "rimraf dist && rimraf coverage",
"clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
Expand Down
10 changes: 5 additions & 5 deletions packages/parser/package.json
Expand Up @@ -6,7 +6,7 @@
"types": "dist/index.d.ts",
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"README.md",
"LICENSE"
],
Expand All @@ -33,9 +33,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -66,9 +66,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/scope-manager/package.json
Expand Up @@ -57,9 +57,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/scope-manager/project.json
Expand Up @@ -6,14 +6,14 @@
"targets": {
"build": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/dist", "{projectRoot}/_ts3.4"],
"outputs": ["{projectRoot}/dist", "{projectRoot}/_ts4.2"],
"options": {
"parallel": false,
"cwd": "packages/scope-manager",
"commands": [
"rimraf _ts3.4",
"rimraf _ts4.2",
"tsc -b tsconfig.build.json",
"downlevel-dts dist _ts3.4/dist"
"downlevel-dts dist _ts4.2/dist --to=4.2"
]
}
},
Expand All @@ -36,6 +36,7 @@
"commands": [
"tsc -b tsconfig.build.json --clean",
"rimraf dist",
"rimraf _ts4.2",
"rimraf _ts3.4",
"rimraf coverage"
]
Expand Down
10 changes: 5 additions & 5 deletions packages/type-utils/package.json
Expand Up @@ -12,7 +12,7 @@
},
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"package.json",
"README.md",
"LICENSE"
Expand All @@ -30,9 +30,9 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -61,9 +61,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/types/package.json
Expand Up @@ -12,7 +12,7 @@
},
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"package.json",
"README.md",
"LICENSE"
Expand All @@ -31,9 +31,9 @@
"scripts": {
"prebuild": "yarn tsx ./tools/copy-ast-spec.ts",
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"generate:lib": "yarn tsx ../scope-manager/tools/generate-lib.ts",
"lint": "nx lint",
Expand Down Expand Up @@ -71,9 +71,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
},
Expand Down
10 changes: 5 additions & 5 deletions packages/typescript-estree/package.json
Expand Up @@ -6,7 +6,7 @@
"types": "dist/index.d.ts",
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"README.md",
"LICENSE"
],
Expand All @@ -33,9 +33,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -75,9 +75,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/utils/package.json
Expand Up @@ -12,7 +12,7 @@
},
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"package.json",
"README.md",
"LICENSE"
Expand All @@ -30,9 +30,9 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -60,9 +60,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/visitor-keys/package.json
Expand Up @@ -12,7 +12,7 @@
},
"files": [
"dist",
"_ts3.4",
"_ts4.2",
"package.json",
"README.md",
"LICENSE"
Expand All @@ -30,9 +30,9 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts3.4/dist",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand All @@ -50,9 +50,9 @@
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<3.8": {
"<4.7": {
"*": [
"_ts3.4/*"
"_ts4.2/*"
]
}
}
Expand Down
63 changes: 59 additions & 4 deletions yarn.lock
Expand Up @@ -4343,6 +4343,61 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/experimental-utils@^5.0.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.52.0.tgz#cc79b91ea62f43bb5e9bec2d94a7df513220e9df"
integrity sha512-kd8CRr04mNE3hw4et6+0T0NI5vli2H6dJCGzjX1r12s/FXUehLVadmvo2Nl3DN80YqAh1cVC6zYZAkpmGiVJ5g==
dependencies:
"@typescript-eslint/utils" "5.52.0"

"@typescript-eslint/scope-manager@5.52.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1"
integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==
dependencies:
"@typescript-eslint/types" "5.52.0"
"@typescript-eslint/visitor-keys" "5.52.0"

"@typescript-eslint/types@5.52.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b"
integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==

"@typescript-eslint/typescript-estree@5.52.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca"
integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==
dependencies:
"@typescript-eslint/types" "5.52.0"
"@typescript-eslint/visitor-keys" "5.52.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/utils@5.52.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72"
integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==
dependencies:
"@types/json-schema" "^7.0.9"
"@types/semver" "^7.3.12"
"@typescript-eslint/scope-manager" "5.52.0"
"@typescript-eslint/types" "5.52.0"
"@typescript-eslint/typescript-estree" "5.52.0"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
semver "^7.3.7"

"@typescript-eslint/visitor-keys@5.52.0":
version "5.52.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f"
integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==
dependencies:
"@typescript-eslint/types" "5.52.0"
eslint-visitor-keys "^3.3.0"

"@webassemblyjs/ast@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
Expand Down Expand Up @@ -6638,10 +6693,10 @@ dotenv@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==

downlevel-dts@>=0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.10.0.tgz#d2be7b4408a1f9eb3a39e15a361f8ea4f175facc"
integrity sha512-AZ7tnUy4XJArsjv6Bcuivvxx+weMvOGHF6seu7e7PVOqMDHMSlfgMl1kt+F4Y2+5TmDwKWHOdimM1DZKihQs8Q==
downlevel-dts@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.11.0.tgz#514a2d723009c5845730c1db6c994484c596ed9c"
integrity sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw==
dependencies:
semver "^7.3.2"
shelljs "^0.8.3"
Expand Down

0 comments on commit 9dbacd8

Please sign in to comment.