Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade to Typescript 5.x #6433

Merged
merged 9 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,31 @@
"open": "^8.4.0",
"plist": "^3.0.5",
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"rimraf": "^4.4.1",
"semver": "^7.3.7",
"tar": "^6.1.11",
"tslib": "^2.4.0",
"xml2js": "^0.4.23"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@types/jest": "^26.0.4",
"@types/jest": "^29.5.0",
"@types/plist": "^3.0.2",
"@types/prompts": "^2.0.14",
"@types/rimraf": "^3.0.2",
"@types/semver": "^7.3.10",
"@types/tar": "^6.1.1",
"@types/tmp": "^0.2.3",
"@types/xml2js": "0.4.5",
"jest": "^26.1.0",
"jest-environment-jsdom": "^29.5.0",
"jest-jasmine2": "^29.5.0",
"jest": "^29.5.0",
"tmp": "^0.2.1",
"ts-jest": "^26.1.3",
"typescript": "~4.9.5"
"ts-jest": "^29.0.5",
"typescript": "~5.0.2"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testRunner": "jest-jasmine2"
},
"publishConfig": {
"access": "public"
Expand Down
13 changes: 8 additions & 5 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@
"devDependencies": {
"@rollup/plugin-node-resolve": "^10.0.0",
"@rollup/plugin-replace": "^2.4.2",
"@types/jest": "^26.0.4",
"jest": "^26.1.0",
"rimraf": "^3.0.2",
"@types/jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-jasmine2": "^29.5.0",
"jest": "^29.5.0",
"rimraf": "^4.4.1",
"rollup": "^2.21.0",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.0.5"
"typescript": "~5.0.2"
},
"jest": {
"preset": "ts-jest"
"preset": "ts-jest",
"testRunner": "jest-jasmine2"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 8 additions & 0 deletions core/src/tests/bridge.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { initBridge } from '../../native-bridge';
import type {
CapacitorInstance,
Expand All @@ -13,6 +17,10 @@ describe('bridge', () => {
beforeEach(() => {
win = {};
initBridge(win);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-empty-function
window.prompt = () => {};
});

it('android nativePromise error', done => {
Expand Down
4 changes: 4 additions & 0 deletions core/src/tests/legacy.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { initBridge } from '../../native-bridge';
import type { CapacitorGlobal } from '../definitions';
import type { WindowCapacitor } from '../definitions-internal';
Expand Down
7 changes: 7 additions & 0 deletions core/src/tests/plugin.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { initBridge } from '../../native-bridge';
import type { CapacitorGlobal, Plugin } from '../definitions';
import type {
Expand All @@ -14,6 +18,9 @@ describe('plugin', () => {

beforeEach(() => {
win = {};
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.setImmediate = global.setTimeout;
});

it('error from missing method from native implementation', async done => {
Expand Down
4 changes: 4 additions & 0 deletions core/src/tests/web-plugin.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { initBridge } from '../../native-bridge';
import type { WindowCapacitor } from '../definitions-internal';
import { createCapacitor } from '../runtime';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.1.1",
"swiftlint": "^1.0.1",
"tar": "^6.1.11"
"tar": "^6.1.11",
"rimraf": "^4.4.1"
}
}