forked from aspect-build/rules_ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: ts_project transpiler linked with failing tsc
- Loading branch information
Showing
18 changed files
with
587 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
examples/connect_node/proto/eliza-ElizaService_connectquery.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare const _default: 1 | ||
export default _default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
load("@aspect_rules_js//js:defs.bzl", "js_library") | ||
load("@aspect_rules_ts//ts:defs.bzl", "ts_project") | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
load("//examples/transpiler:babel.bzl", "babel") | ||
|
||
js_library( | ||
name = "pkg", | ||
srcs = [":lib"], | ||
visibility = ["//examples:__subpackages__"], | ||
) | ||
|
||
ts_project( | ||
name = "lib", | ||
srcs = ["index.ts"], | ||
declaration = True, # True even though we are asserting tsc is not run | ||
tags = ["manual"], # manual to prevent test //... from triggering | ||
transpiler = babel, | ||
visibility = ["//examples:__subpackages__"], | ||
) | ||
|
||
# Targets which should never force tsc to run | ||
build_test( | ||
name = "lib-no-typecheck", | ||
targets = [ | ||
":pkg", | ||
":lib", | ||
"index.js", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// INTENTIONAL typecheck error | ||
console.log(3 + global) | ||
|
||
// INTENTIONAL typecheck error | ||
const B: string = 42 | ||
|
||
module.exports.B = B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true | ||
}, | ||
// Workaround https://github.com/microsoft/TypeScript/issues/59036 | ||
"exclude": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
load("@aspect_rules_js//js:defs.bzl", "js_library") | ||
load("@aspect_rules_ts//ts:defs.bzl", "ts_project") | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
load("//examples/transpiler:babel.bzl", "babel") | ||
|
||
js_library( | ||
name = "pkg", | ||
srcs = [":lib"], | ||
visibility = ["//examples:__subpackages__"], | ||
) | ||
|
||
ts_project( | ||
name = "lib", | ||
srcs = ["index.ts"], | ||
declaration = True, # True even though we are asserting tsc is not run | ||
tags = ["manual"], # manual to prevent test //... from triggering | ||
transpiler = babel, | ||
visibility = ["//examples:__subpackages__"], | ||
) | ||
|
||
# Targets which should never force tsc to run | ||
build_test( | ||
name = "lib-no-typecheck", | ||
targets = [ | ||
":pkg", | ||
":lib", | ||
"index.js", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// INTENTIONAL typecheck error | ||
console.log(3 + global) | ||
|
||
// INTENTIONAL typecheck error | ||
const B: string = 42 | ||
|
||
module.exports.B = B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "@myorg/lib_nocompile_linked" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true | ||
}, | ||
// Workaround https://github.com/microsoft/TypeScript/issues/59036 | ||
"exclude": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Asserts packages containing non-compiling ts | ||
|
||
const a = require('@myorg/lib_nocompile') | ||
const b = require('@myorg/lib_nocompile_linked') | ||
|
||
console.log('loaded non-compiling dependencies', a, b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.