GeezerVison is showing github.com — BridgeJS: Check generated TypeScript validity in test suites (#611) · tayloraswift/JavaScriptKit@63cb9af
File tree
Expand file treeCollapse file tree
Open diff view settings
Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/test.yml +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
69 | 69 | git diff --exit-code Sources/JavaScriptKit/Runtime |
70 | 70 | - run: swift test --package-path ./Plugins/PackageToJS |
71 | 71 | - run: swift test --package-path ./Plugins/BridgeJS |
| 72 | + - name: Validate BridgeJS TypeScript declarations |
| 73 | + run: npm run check:bridgejs-dts |
72 | 74 |
|
73 | 75 | test-bridgejs-against-swift-versions: |
74 | 76 | name: Test BridgeJS against Swift versions |
|
90 | 92 | node-version: '20' |
91 | 93 | - name: Install TypeScript |
92 | 94 | run: npm install |
| 95 | + - name: Validate BridgeJS TypeScript declarations |
| 96 | + run: npm run check:bridgejs-dts |
93 | 97 | - name: Run BridgeJS tests |
94 | 98 | # NOTE: Seems like the prebuilt SwiftSyntax binaries are not compatible with |
95 | 99 | # non-macro dependents, so disable experimental prebuilts for now. |
|
Collapse file
Copy file name to clipboard +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +{ |
| 2 | + "compilerOptions": { |
| 3 | + "strict": true, |
| 4 | + "noEmit": true, |
| 5 | + "skipLibCheck": false, |
| 6 | + "target": "ES2020", |
| 7 | + "module": "ES2020", |
| 8 | + "moduleResolution": "node", |
| 9 | + "lib": ["ES2020", "DOM"] |
| 10 | + }, |
| 11 | + "include": ["*.d.ts"] |
| 12 | +} |
Collapse file
Copy file name to clipboardExpand all lines: package.json +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
13 | 13 | "build:clean": "rm -rf Runtime/lib", |
14 | 14 | "build:ts": "cd Runtime; rollup -c", |
15 | 15 | "prepublishOnly": "npm run build", |
16 | | - "format": "prettier --write Runtime/src" |
| 16 | + "format": "prettier --write Runtime/src", |
| 17 | + "check:bridgejs-dts": "tsc --project Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/tsconfig.json" |
17 | 18 | }, |
18 | 19 | "keywords": [ |
19 | 20 | "Swift", |
|