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
@angular/localize should have @babel/core as a devDependency #38329
Comments
This is an interesting one. The proposed solution of listing This situation occurs because I think you could workaround by changing |
@JoostK Thanks for clearing this up! Maybe long-term it makes sense to split |
@Airblader Yeah, the way to go about it needs some discussion. Splitting could be one option, although I think it makes more sense to move the tooling part of |
The original aim as to keep But I agree that this is something we should consider going forward. As it turns out, unless you are going to use "runtime" localization in your project then there is never a need for any of the |
So here is my plan:
I need to dig into schematics a bit to see if I can do this reasonably. |
…fault Previously this package was installed in the default `dependencies` section of `package.json`, but this meant that its dependencies are treated as dependencies of the main project - Babel, for example. Generally, $localize` is not used at runtime - it is compiled out by the translation tooling, so there is no need for it to be a full dependency. This commit changes the default location of the package to be the `devDependencies` section, but gives the user a prompt to choose otherwise. Fixes angular#38329
…fault Previously this package was installed in the default `dependencies` section of `package.json`, but this meant that its own dependencies are treated as dependencies of the main project: Babel, for example. Generally, $localize` is not used at runtime - it is compiled out by the translation tooling, so there is no need for it to be a full dependency. In fact, even if it is used at runtime, the package itself is only used at dev-time since the runtime bits will be bundled into a distributable. So putting this package in `devDependencies` would only prevent libraries from bringing the package into application projects that used them. This is probably good in itself, since it should be up to the downstream project to decide if it wants to include `@angular/localize` at runtime. This commit changes the default location of the package to be the `devDependencies` section, but gives an option `useAtRuntime` to choose otherwise. Fixes angular#38329
…fault (#38680) Previously this package was installed in the default `dependencies` section of `package.json`, but this meant that its own dependencies are treated as dependencies of the main project: Babel, for example. Generally, $localize` is not used at runtime - it is compiled out by the translation tooling, so there is no need for it to be a full dependency. In fact, even if it is used at runtime, the package itself is only used at dev-time since the runtime bits will be bundled into a distributable. So putting this package in `devDependencies` would only prevent libraries from bringing the package into application projects that used them. This is probably good in itself, since it should be up to the downstream project to decide if it wants to include `@angular/localize` at runtime. This commit changes the default location of the package to be the `devDependencies` section, but gives an option `useAtRuntime` to choose otherwise. Fixes #38329 PR Close #38680
…fault (angular#38680) Previously this package was installed in the default `dependencies` section of `package.json`, but this meant that its own dependencies are treated as dependencies of the main project: Babel, for example. Generally, $localize` is not used at runtime - it is compiled out by the translation tooling, so there is no need for it to be a full dependency. In fact, even if it is used at runtime, the package itself is only used at dev-time since the runtime bits will be bundled into a distributable. So putting this package in `devDependencies` would only prevent libraries from bringing the package into application projects that used them. This is probably good in itself, since it should be up to the downstream project to decide if it wants to include `@angular/localize` at runtime. This commit changes the default location of the package to be the `devDependencies` section, but gives an option `useAtRuntime` to choose otherwise. Fixes angular#38329 PR Close angular#38680
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Affected Package
@angular/localize
Is this a regression?
not sure
Description
@angular/localize
has@babel/core
as a dependency, and not a devDependency.We use BlackDuck for all the license attributions for the code we ship, but because
@babel/core
is include here, all the@babel/*
and dependencies show up for BlackDuck to generate a report on, and include in our distributed license file even though none of that is browser code that will be shipped to users.🔬 Minimal Reproduction
ng create new-project
ng add @angular/localize
The text was updated successfully, but these errors were encountered: