build(deps): upgrade to TypeScript 4
This commit is contained in:
parent
91700fbec2
commit
7454e2a52b
12
package.json
12
package.json
@ -43,7 +43,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ls-lint/ls-lint": "^1.8.0",
|
||||
"@microsoft/api-extractor": "^7.3.9",
|
||||
"@microsoft/api-extractor": "^7.9.7",
|
||||
"@rollup/plugin-commonjs": "^13.0.0",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
@ -51,13 +51,13 @@
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "13.11.1",
|
||||
"@types/puppeteer": "^2.0.0",
|
||||
"@typescript-eslint/parser": "^3.2.0",
|
||||
"@typescript-eslint/parser": "^3.9.1",
|
||||
"brotli": "^1.3.2",
|
||||
"chalk": "^4.1.0",
|
||||
"conventional-changelog-cli": "^2.0.31",
|
||||
"csstype": "^2.6.8",
|
||||
"enquirer": "^2.3.2",
|
||||
"eslint": "^7.2.0",
|
||||
"eslint": "^7.7.0",
|
||||
"execa": "^4.0.2",
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^26.0.1",
|
||||
@ -70,11 +70,11 @@
|
||||
"rollup-plugin-node-builtins": "^2.1.2",
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
"rollup-plugin-terser": "^6.1.0",
|
||||
"rollup-plugin-typescript2": "^0.27.1",
|
||||
"rollup-plugin-typescript2": "^0.27.2",
|
||||
"semver": "^7.3.2",
|
||||
"serve": "^11.3.0",
|
||||
"ts-jest": "^26.1.0",
|
||||
"typescript": "^3.9.3",
|
||||
"ts-jest": "^26.2.0",
|
||||
"typescript": "^4.0.2",
|
||||
"yorkie": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ export function parse(
|
||||
`its syntax will be ambiguous outside of the component.`
|
||||
)
|
||||
)
|
||||
delete descriptor.scriptSetup
|
||||
descriptor.scriptSetup = null
|
||||
}
|
||||
if (descriptor.script && descriptor.script.src) {
|
||||
errors.push(
|
||||
@ -185,7 +185,7 @@ export function parse(
|
||||
`also present because they must be processed together.`
|
||||
)
|
||||
)
|
||||
delete descriptor.script
|
||||
descriptor.script = null
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ describe('reactivity/effect', () => {
|
||||
effect(() => (dummy = obj.prop))
|
||||
|
||||
expect(dummy).toBe('value')
|
||||
// @ts-ignore
|
||||
delete obj.prop
|
||||
expect(dummy).toBe(undefined)
|
||||
})
|
||||
@ -76,6 +77,7 @@ describe('reactivity/effect', () => {
|
||||
effect(() => (dummy = 'prop' in obj))
|
||||
|
||||
expect(dummy).toBe(true)
|
||||
// @ts-ignore
|
||||
delete obj.prop
|
||||
expect(dummy).toBe(false)
|
||||
obj.prop = 12
|
||||
@ -90,6 +92,7 @@ describe('reactivity/effect', () => {
|
||||
effect(() => (dummy = counter.num))
|
||||
|
||||
expect(dummy).toBe(0)
|
||||
// @ts-ignore
|
||||
delete counter.num
|
||||
expect(dummy).toBe(2)
|
||||
parentCounter.num = 4
|
||||
@ -106,8 +109,10 @@ describe('reactivity/effect', () => {
|
||||
effect(() => (dummy = 'num' in counter))
|
||||
|
||||
expect(dummy).toBe(true)
|
||||
// @ts-ignore
|
||||
delete counter.num
|
||||
expect(dummy).toBe(true)
|
||||
// @ts-ignore
|
||||
delete parentCounter.num
|
||||
expect(dummy).toBe(false)
|
||||
counter.num = 3
|
||||
@ -219,6 +224,7 @@ describe('reactivity/effect', () => {
|
||||
expect(hasDummy).toBe(true)
|
||||
obj[key] = 'newValue'
|
||||
expect(dummy).toBe('newValue')
|
||||
// @ts-ignore
|
||||
delete obj[key]
|
||||
expect(dummy).toBe(undefined)
|
||||
expect(hasDummy).toBe(false)
|
||||
@ -648,6 +654,7 @@ describe('reactivity/effect', () => {
|
||||
newValue: 2
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
delete obj.foo
|
||||
expect(dummy).toBeUndefined()
|
||||
expect(onTrigger).toHaveBeenCalledTimes(2)
|
||||
|
@ -68,18 +68,21 @@ describe('reactivity/readonly', () => {
|
||||
`Set operation on key "Symbol(qux)" failed: target is readonly.`
|
||||
).toHaveBeenWarnedLast()
|
||||
|
||||
// @ts-ignore
|
||||
delete wrapped.foo
|
||||
expect(wrapped.foo).toBe(1)
|
||||
expect(
|
||||
`Delete operation on key "foo" failed: target is readonly.`
|
||||
).toHaveBeenWarnedLast()
|
||||
|
||||
// @ts-ignore
|
||||
delete wrapped.bar.baz
|
||||
expect(wrapped.bar.baz).toBe(2)
|
||||
expect(
|
||||
`Delete operation on key "baz" failed: target is readonly.`
|
||||
).toHaveBeenWarnedLast()
|
||||
|
||||
// @ts-ignore
|
||||
delete wrapped[qux]
|
||||
expect(wrapped[qux]).toBe(3)
|
||||
expect(
|
||||
|
@ -356,6 +356,7 @@ describe('api: lifecycle hooks', () => {
|
||||
newValue: 2
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
delete obj.bar
|
||||
await nextTick()
|
||||
expect(onTrigger).toHaveBeenCalledTimes(2)
|
||||
|
@ -707,6 +707,7 @@ describe('api: watch', () => {
|
||||
newValue: 2
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
delete obj.foo
|
||||
await nextTick()
|
||||
expect(dummy).toBeUndefined()
|
||||
|
@ -258,7 +258,7 @@ export function createAppAPI<HostElement>(
|
||||
},
|
||||
|
||||
provide(key, value) {
|
||||
if (__DEV__ && key in context.provides) {
|
||||
if (__DEV__ && (key as string | symbol) in context.provides) {
|
||||
warn(
|
||||
`App already provides property with key "${String(key)}". ` +
|
||||
`It will be overwritten with the new value.`
|
||||
|
@ -37,7 +37,7 @@ export function inject(
|
||||
const instance = currentInstance || currentRenderingInstance
|
||||
if (instance) {
|
||||
const provides = instance.provides
|
||||
if (key in provides) {
|
||||
if ((key as string | symbol) in provides) {
|
||||
// TS doesn't allow symbol as index type
|
||||
return provides[key as string]
|
||||
} else if (arguments.length > 1) {
|
||||
|
64
yarn.lock
64
yarn.lock
@ -570,23 +570,23 @@
|
||||
resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c"
|
||||
integrity sha512-sugEjWjSSy9OHF6t1ZBLZCAROj52cZthB9dIePmzZzzMwmWwy3qAEMSdJheHeS1FOwDZI7Ipm1H/bWgzJNnSAw==
|
||||
|
||||
"@microsoft/api-extractor-model@7.8.15":
|
||||
version "7.8.15"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.8.15.tgz#a9ade86180157aead2e63e5edb439c4d8f158049"
|
||||
integrity sha512-z81RLrvZdCxPMDBH6JVtZAMMrxDsDGz4mW7GM6OGxPlooTtSVtPH9RNhZFbA6zp7/4ANgBlqURl8zIsxvFeppA==
|
||||
"@microsoft/api-extractor-model@7.8.16":
|
||||
version "7.8.16"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.8.16.tgz#0d4eb2ca65a62db2c2e0db3ee1ba04af74afef55"
|
||||
integrity sha512-zaYRgFLjz3bzpvco36+DDnk30+vx6keqvJMa36oftG2vu3aDr4g0VBH/7O5ItXLps1H6xdinLJDvet5/VZdwPQ==
|
||||
dependencies:
|
||||
"@microsoft/tsdoc" "0.12.19"
|
||||
"@rushstack/node-core-library" "3.27.0"
|
||||
"@rushstack/node-core-library" "3.28.0"
|
||||
|
||||
"@microsoft/api-extractor@^7.3.9":
|
||||
version "7.9.5"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.9.5.tgz#38a17e81466763c60714e2e6b8160d49fa209fa8"
|
||||
integrity sha512-vqatQEp62zi+kjWzAbQZHR1/BHuM9EdLvH6yJX+TRrgY3qONJmZ4cMP6hc5QdqkW8V8fDR8B559nQOxmRQfXHg==
|
||||
"@microsoft/api-extractor@^7.9.7":
|
||||
version "7.9.7"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.9.7.tgz#6be23719c47903959bc2b54853bfbb75c2509e12"
|
||||
integrity sha512-EFkJh7RdS/wZ+LahoOiK/SIMRar+p4sRyNqIc+n4iNfL0cQP4N2saFJwM2GSfImabk+q+Ug9jX2O5EWwia9QiA==
|
||||
dependencies:
|
||||
"@microsoft/api-extractor-model" "7.8.15"
|
||||
"@microsoft/api-extractor-model" "7.8.16"
|
||||
"@microsoft/tsdoc" "0.12.19"
|
||||
"@rushstack/node-core-library" "3.27.0"
|
||||
"@rushstack/ts-command-line" "4.4.8"
|
||||
"@rushstack/node-core-library" "3.28.0"
|
||||
"@rushstack/ts-command-line" "4.6.0"
|
||||
colors "~1.2.1"
|
||||
lodash "~4.17.15"
|
||||
resolve "~1.17.0"
|
||||
@ -649,27 +649,29 @@
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@rushstack/node-core-library@3.27.0":
|
||||
version "3.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.27.0.tgz#474446d29dcb5166946af2cd9ec86d58e1444b58"
|
||||
integrity sha512-6fS7wqcxL4XGVFkhECMCqsqXouPRDWKMgNpyrmXJRS0PPumRMW+9m2knVK/kgTrMwcnbGysqxX/77PiFErw8wg==
|
||||
"@rushstack/node-core-library@3.28.0":
|
||||
version "3.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.28.0.tgz#e52b4171cb2a62fc347b3ca18a408f53281f6ae0"
|
||||
integrity sha512-9I9kSbZCwjx6y5F6HejTE529xDYIlGM8mu691XtyLl4OzX+1EZ4xxOXkWVVxirolk6SilDu5UqSeFuVgmb5dwA==
|
||||
dependencies:
|
||||
"@types/node" "10.17.13"
|
||||
colors "~1.2.1"
|
||||
fs-extra "~7.0.1"
|
||||
import-lazy "~4.0.0"
|
||||
jju "~1.4.0"
|
||||
semver "~7.3.0"
|
||||
timsort "~0.3.0"
|
||||
z-schema "~3.18.3"
|
||||
|
||||
"@rushstack/ts-command-line@4.4.8":
|
||||
version "4.4.8"
|
||||
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.4.8.tgz#46559932c7e9a70ea071c3ce376a2e7ad0d2e9b1"
|
||||
integrity sha512-giyVXuyI2BAID0BINp8TbxcTf5MEao+UPadAMfCuuS64mSE1E76S8wzhjqEy3WaTSpgyRDi7dMlEegNnD/97Gw==
|
||||
"@rushstack/ts-command-line@4.6.0":
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.6.0.tgz#3bbbcecf90a8bd27516c9be84485c2d11c26b23d"
|
||||
integrity sha512-myW3frGcErzdCul2Bde5tI2036zwBDAmDMaNs44p0KzFAnefmb2W8M16pmyj216k54UbV/J+eh3sZFCo6+xrlg==
|
||||
dependencies:
|
||||
"@types/argparse" "1.0.38"
|
||||
argparse "~1.0.9"
|
||||
colors "~1.2.1"
|
||||
string-argv "~0.3.1"
|
||||
|
||||
"@sinonjs/commons@^1.7.0":
|
||||
version "1.7.1"
|
||||
@ -903,7 +905,7 @@
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^3.2.0":
|
||||
"@typescript-eslint/parser@^3.9.1":
|
||||
version "3.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.9.1.tgz#ab7983abaea0ae138ff5671c7c7739d8a191b181"
|
||||
integrity sha512-y5QvPFUn4Vl4qM40lI+pNWhTcOWtpZAJ8pOEQ21fTTW4xTJkRplMjMRje7LYTXqVKKX9GJhcyweMz2+W1J5bMg==
|
||||
@ -2588,7 +2590,7 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
|
||||
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
|
||||
|
||||
eslint@^7.2.0:
|
||||
eslint@^7.7.0:
|
||||
version "7.7.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.7.0.tgz#18beba51411927c4b64da0a8ceadefe4030d6073"
|
||||
integrity sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==
|
||||
@ -3396,6 +3398,11 @@ import-fresh@^3.0.0, import-fresh@^3.1.0:
|
||||
parent-module "^1.0.0"
|
||||
resolve-from "^4.0.0"
|
||||
|
||||
import-lazy@~4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153"
|
||||
integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==
|
||||
|
||||
import-local@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6"
|
||||
@ -6247,7 +6254,7 @@ rollup-plugin-terser@^6.1.0:
|
||||
serialize-javascript "^3.0.0"
|
||||
terser "^4.7.0"
|
||||
|
||||
rollup-plugin-typescript2@^0.27.1:
|
||||
rollup-plugin-typescript2@^0.27.2:
|
||||
version "0.27.2"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.2.tgz#871a7f5d2a774f9cef50d25da868eec72acc2ed8"
|
||||
integrity sha512-zarMH2F8oT/NO6p20gl/jkts+WxyzOlhOIUwUU/EDx5e6ewdDPS/flwLj5XFuijUCr64bZwqKuRVwCPdXXYefQ==
|
||||
@ -6684,7 +6691,7 @@ stealthy-require@^1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
|
||||
integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
|
||||
|
||||
string-argv@0.3.1:
|
||||
string-argv@0.3.1, string-argv@~0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
|
||||
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
|
||||
@ -7098,7 +7105,7 @@ trim-right@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
|
||||
integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
|
||||
|
||||
ts-jest@^26.1.0:
|
||||
ts-jest@^26.2.0:
|
||||
version "26.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.2.0.tgz#7ec22faceb05ee1467fdb5265d1b33c27441f163"
|
||||
integrity sha512-9+y2qwzXdAImgLSYLXAb/Rhq9+K4rbt0417b8ai987V60g2uoNWBBmMkYgutI7D8Zhu+IbCSHbBtrHxB9d7xyA==
|
||||
@ -7200,7 +7207,12 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^3.9.3, typescript@~3.9.5:
|
||||
typescript@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
|
||||
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
|
||||
|
||||
typescript@~3.9.5:
|
||||
version "3.9.7"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
|
||||
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
|
||||
|
Loading…
Reference in New Issue
Block a user