-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(module-type-aliases): move @type packages to dependencies #5601
Conversation
✔️ [V2] 🔨 Explore the source changes: 14cc853 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/614ad3a6e4b86f00073b7b0d 😎 Browse the preview: https://deploy-preview-5601--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5601--docusaurus-2.netlify.app/ |
✔️ [V2] 🔨 Explore the source changes: e3a3cff 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/614b0c2655799c0007486391 😎 Browse the preview: https://deploy-preview-5601--docusaurus-2.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks, just missing ts template update?
|
||
```bash npm2yarn | ||
npm install --save-dev typescript @docusaurus/module-type-aliases @types/react @types/react-router-dom @types/react-helmet @tsconfig/docusaurus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we remove those from the TS template as well?
Are you sure it works? I don't think we have any e2e test on this yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependencies
will be installed transitively but devDependencies
don't, so afaik it should work. I'll update the template and check it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, let me know if the TS template still works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking longer than I thought🧐 Tried to set up a verdaccio registry locally, but when I npm_config_registry=http://localhost:4873 yarn install
, I still get the real 2.0.0-beta.6
version on npm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slorber Tested, it's working🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
FYI I added a readme in init package with simpler local testing instructions without Verdaccio:
@docusaurus/init
Create Docusaurus apps easily.
Usage
Please see the installation documentation.
For maintainers
For Docusaurus maintainers, templates can be tested with:
cd `git rev-parse --show-toplevel` # Back to repo root
rm -rf test-website
yarn docusaurus-init init test-website classic
cd test-website
yarn start
Note: test-website
is not part of the workspace and use packages from npm.
Use the following to test the templates against local packages:
cd `git rev-parse --show-toplevel` # Back to repo root
rm -rf test-website-in-workspace
yarn docusaurus-init init test-website-in-workspace classic
cd test-website-in-workspace
yarn start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, the problem here is whether npm installs @types/
dependencies transitively, so I do need to mock that process of running the whole yarn install
process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I see 😅
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
5abc440
to
e3a3cff
Compare
Motivation
Should fix #5463. It seems we can also update the docs since installing
@docusaurus/module-type-aliases
would install all the@types/*
dependencies so they no longer need to be installed separately?Also removed
index.js
file fromdocusaurus-types
as it doesn't really make sense.Have you read the Contributing Guidelines on pull requests?
Yes