-
Notifications
You must be signed in to change notification settings - Fork 11
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
Builds fail when using verbatimModuleSyntax
in TS compilation
#1314
Comments
Thanks for reporting @yharaskrik - we'll investigate and get back to you. |
Thank you! I appreciate it, this is the command I am running.
Tsconfig {
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"],
"emitDecoratorMetadata": true,
"target": "esnext",
"verbatimModuleSyntax": true
},
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
} Base tsconfig
|
Is there a reason the source files are shipped with the package and not just the |
Mostly to make debugging easier. I think we still need to enable the "ts sourcemaps" though. It's unclear to me with your provided setup is processing TypeScript files in node_modules, as that is not the default for TypeScript files. I wonder if the issue is bun itself, which I think prefers the |
I am only using bun as the runner (instead of node) and calling tsc. So it shouldn't have anything to do with how tsc is resolving the files but I can try without it. I am sure I'll get the same result. |
Yes, please try it without. 🙏 The |
I'm okay with updating our TypeScript source for However, your base config also sets |
Ok i figured it out, it was not a bun issue, and isn't an issue for a modern version of
or
It does not happen. You are absolutely right that it should not be traversing node_modules. This can now be closed! |
Note: looks like its back, our CI just failed with it (even though it passed locally earlier). I will keep trying to dig into it as it absolutely should not be doing this, super weird, but I want to use arcjet. Not shipping the source files would fix it, but that change shouldn't be needed (I suspect none of our other packages are shipping source files and thats why we haven't run into this before) |
This is a breaking change to our tsconfig. I've enabled the `verbatimModuleSyntax` config which requires annotating type imports as such so they can be eliminated at build time. This required changes to the source files here and will require changes anywhere else this is used. Closes #1314
Automatically generated with [Release Please](https://github.com/googleapis/release-please). --- <details><summary>@arcjet/analyze: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/analyze-v1.0.0-alpha.22) (2024-08-26) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/body: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/body-v1.0.0-alpha.22) (2024-08-26) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/bun: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/bun-v1.0.0-alpha.22) (2024-08-26) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/env bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/headers bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/ip bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/logger bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/transport bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * arcjet bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/decorate: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/decorate-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/sprintf bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/duration: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/duration-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/duration:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/env: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/env-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/env:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/eslint-config: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/eslint-config-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/eslint-config:** Synchronize arcjet-js versions </details> <details><summary>@arcjet/headers: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/headers-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/headers:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/ip: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/ip-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/logger: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/logger-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/logger:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/sprintf bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/next: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/next-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/env bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/headers bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/ip bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/logger bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/transport bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * arcjet bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/node: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/node-v1.0.0-alpha.22) (2024-08-26) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/env bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/headers bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/ip bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/logger bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/transport bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/body bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * arcjet bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/protocol: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/protocol-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/rollup-config: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/rollup-config-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/rollup-config:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/runtime: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/runtime-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/runtime:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/sprintf: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/sprintf-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/sprintf:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/sveltekit: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/sveltekit-v1.0.0-alpha.22) (2024-08-26) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/env bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/headers bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/ip bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/logger bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/transport bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * arcjet bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/transport: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/transport-v1.0.0-alpha.22) (2024-08-26) ### 🧹 Miscellaneous Chores * **@arcjet/transport:** Synchronize arcjet-js versions ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>@arcjet/tsconfig: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.21...@arcjet/tsconfig-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) </details> <details><summary>arcjet: 1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](v1.0.0-alpha.21...arcjet-v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/analyze bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/duration bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/headers bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/protocol bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/runtime bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/rollup-config bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 * @arcjet/tsconfig bumped from 1.0.0-alpha.21 to 1.0.0-alpha.22 </details> <details><summary>1.0.0-alpha.22</summary> ## [1.0.0-alpha.22](v1.0.0-alpha.21...v1.0.0-alpha.22) (2024-08-26) ### ⚠ BREAKING CHANGES * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ### 🚀 New Features * add detect sensitive info rule ([#1300](#1300)) ([006e344](006e344)) ### 🧹 Miscellaneous Chores * **tsconfig:** Enable verbatim module syntax ([#1324](#1324)) ([7012b54](7012b54)), closes [#1314](#1314) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
I just installed the Arcjet SDK to use in our Nest application as a global guard but when I run the TS compilation with the
verbatimModuleSyntax
flag I getIt looks like TS is not able to find the .js/.d.ts files and instead reverting to building from source? I am importing arcjet just like the examples
import arcjet, { detectBot, slidingWindow } from '@arcjet/node';
So it should just work, has anyone else seen this happen?
here is the output from using
--explainFiles
, I have never seen source like this get included in a build.This looks like the key part, the arcjet/protocol, index.ts is being included in the build from a JS file.
The text was updated successfully, but these errors were encountered: