-
Notifications
You must be signed in to change notification settings - Fork 522
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
Excess files from ts_library land in pkg_npm #1499
Comments
.d.ts outputs are expected. what are the "various extra files under external"? could you include some directory listing of what you are seeing? maybe pkg_npm is missing some filtering to avoid files outside your repo being copied |
In the repro, a very simple pkg_npm target named "example" is built. Its contents are below. I expected to see just the first 2 files and the last 1. All the rest appear superflous.
(I suppose this distraction is what I deserve for wandering over to the allure of my computer during a break from holiday festivities ;-) ) |
Ran in to this - npm deps used by ts_library end up in |
Happy to hear I was not delirious and the problem is real. Also as linked by @gregmagolan in #1551 (comment) |
…ckage This logic assumed that package_path was non-empty, but when a pkg_npm rule appears in the workspace root, package_path will be empty string and the startswith guard has no effect. Fixes bazel-contrib#1499
…ckage This logic assumed that package_path was non-empty, but when a pkg_npm rule appears in the workspace root, package_path will be empty string and the startswith guard has no effect. Fixes bazel-contrib#1499
…ckage This logic assumed that package_path was non-empty, but when a pkg_npm rule appears in the workspace root, package_path will be empty string and the startswith guard has no effect. Fixes bazel-contrib#1499
…ckage This logic assumed that package_path was non-empty, but when a pkg_npm rule appears in the workspace root, package_path will be empty string and the startswith guard has no effect. Fixes bazel-contrib#1499
🐞 bug report
Affected Rule
ts_library
and/orpkg_npm
Is this a regression?
No, as far as I know, but I did not check previous versions.
Description
I set about building an npm package using Bazel and TypeScript. Following what appeared to be the documented and/or example mechanisms out there, it mostly works, but there seem to be excess files.
🔬 Minimal Reproduction
https://github.com/kylecordes/ts-package-repro
(I am aware that this is so minimal as to be perhaps not be idiomatic in terms of the contents of the generated package containing different ES versions, packagings, etc.)
🔥 Exception or Error
There is no error, but many more files come along from the output of ts_library and land in the pkg_npm generated package than I expect based on examples, documentation, discussion, etc. For example, the .js output from ts_library, various extra .d.ts files under "external".
🌍 Your Environment
Operating System:
OSX Catalina
(But I saw #1486... so I verified the same output with Bazel 1.2.1.)
Rules_nodejs version:
(Please check that you have matching versions between WORKSPACE file and
@bazel/*
npm packages.)Anything else relevant?
I am not yet 100% familiar with all wrinkles of how rules_nodejs handles package generation, and there are potentially relevant open issues like #1265.
The text was updated successfully, but these errors were encountered: