-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Clean usage of @types/webpack-env
dep in all packages
#9536
Merged
Conversation
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 pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/fmguac8k9 |
gaetanmaisse
force-pushed
the
fix-webpack-env
branch
from
January 19, 2020 10:26
5b34f93
to
b62b8fc
Compare
gaetanmaisse
added
patch:yes
Bugfix & documentation PR that need to be picked to main branch
typescript
labels
Jan 19, 2020
gaetanmaisse
force-pushed
the
fix-webpack-env
branch
from
January 19, 2020 11:27
b62b8fc
to
e17e05a
Compare
gaetanmaisse
requested review from
alexandrebodin,
alterx,
CodeByAlex,
igor-dv,
jbovenschen,
kazupon,
leonrodenburg,
ndelangen,
renaudtertrais,
theinterned,
thomasbertet,
tmeasday,
usulpro and
z4o4z
as code owners
January 19, 2020 12:06
- `@types/webpack-env` must be defined as `dependencies` in packages that export a type/function using typings from `@types/webpack-env` (it is often `NodeModule`). In that case `/// <reference types="webpack-env" />` is present in some files of the `dist` folder of the lib. Example: `lib/client-api`. - `@types/webpack-env` must be defined as `devDependencies` in packages that use its typings internally but does not expose anything related to it. Many addons need the type because they use `module.hot` function. Example: `addons/a11y` - `webpack-env` should be removed from "compilerOptions.types" key of `tsconfig.json` of packages that don't need it. I also bump `@types/webpack-env` to ^1.15.0 to have the same version all across the monorepo
gaetanmaisse
force-pushed
the
fix-webpack-env
branch
from
January 20, 2020 07:41
e17e05a
to
36ee762
Compare
ndelangen
approved these changes
Jan 20, 2020
shilman
added
the
patch:done
Patch/release PRs already cherry-picked to main/release branch
label
Jan 21, 2020
This was referenced Feb 12, 2020
This was referenced Feb 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
patch:done
Patch/release PRs already cherry-picked to main/release branch
patch:yes
Bugfix & documentation PR that need to be picked to main branch
typescript
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #7855
What I did
Clean usage of
@types/webpack-env
dep in all packages:@types/webpack-env
must be defined asdependencies
in packages that export a type/function using typings from@types/webpack-env
(it is oftenNodeModule
). In that case/// <reference types="webpack-env" />
is present in some files of thedist
folder of the lib. Example:lib/client-api
.@types/webpack-env
must be defined asdevDependencies
in packages that use its typings internally but does not expose anything related to it. Many addons need the types because they usemodule.hot
function. Example:addons/a11y
webpack-env
should be removed from "compilerOptions.types" key oftsconfig.json
of packages that don't need it.I also bump
@types/webpack-env
to^1.15.0
to have the same version all across the monorepo.