Skip to content

Commit

Permalink
test: assert external tsconfig is usable with workers
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Nov 11, 2022
1 parent 20697ec commit 6b0c56a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
path: |
"~/.cache/bazel"
"~/.cache/bazel-repo"
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }}
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'ts/private/ts_project_worker.js', 'WORKSPACE') }}
restore-keys: bazel-cache-
- name: bazel test //...
env:
Expand Down
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@types/node": "18.6.1",
"date-fns": "2.29.1",
"rxjs": "7",
"typescript": "4.8.2"
"typescript": "4.8.2",
"@tsconfig/node16-strictest-esm": "^1.0.3"
}
}
6 changes: 6 additions & 0 deletions examples/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions examples/tsconfig_external/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")

ts_config(
name = "config",
src = "tsconfig.json",
deps = [
"//examples:node_modules/@tsconfig/node16-strictest-esm"
],
)

ts_project(
name = "tsconfig_external",
srcs = [
"index.ts",
],
tsconfig = ":config"
)
6 changes: 6 additions & 0 deletions examples/tsconfig_external/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


// @ts-expect-error
function name(params: number) {

}
3 changes: 3 additions & 0 deletions examples/tsconfig_external/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@tsconfig/node16-strictest-esm/tsconfig.json"
}

0 comments on commit 6b0c56a

Please sign in to comment.