4.0 KiB
4.0 KiB
Contributing
Read the Contributing Guide at Blitzjs.com
Notes For Core Team
To Publish a new NPM Package under @blitzjs/ namespace
- cd into the package directory
- Run
npm publish --tag danger --access public--access publicis required because scoped packages are set to private by default
Syncing Next.js Fork
- Run
yarn push-nextjs- If it fails with an error of
git-subrepo: Can't commit: 'subrepo/nextjs' doesn't contain upstream HEAD:, then runyarn push-nextjs --force(see https://github.com/ingydotnet/git-subrepo/issues/530)
- If it fails with an error of
- Create new git branch for the upgrade
- In the forked repo (https://github.com/blitz-js/next.js), run:
git pullgit fetch --allgit merge v10.2.0(change the version to be the version you are updating to)- Run
rm -rf examples && git add examples - To resolve conflict with their version for a path, like docs, run this:
git checkout --theirs docs && git add docs
- Resolve all merge conflicts and complete merge
- Run
yarnand make sure all builds complete - Run
yarn lintand fix any issues - Commit all changes to finish merge
git push
- Run
yarn pull-nextjs - Run
yarn - Run
yarn manypkg checkand optionallyyarn manypkg fixto fix any issues - Under
nextjs/, run./scripts/check-pre-compiled.shand commit the changes - Run
yarn build:nextjs - Run
yarn lint- fix any issues - Run
yarn build- fix any issues - Run
yarn test:nextjs-sizeand update tests if there are any failures - Open PR and fix any failing tests
- Update any references to nextjs in new code including imports like
next/image, etc. - Any doc updates needed?
- Merge PR
yarn push-nextjs
Troubleshooting
yarn lint - Failed to load parser
Caused by invalid version of @babel/eslint-parser. 7.13.14 is a working version. I think it may be an incompatibility between this version and the version of eslint?
- change version of eslint-parser
- run
yarn --check-files - run
./scripts/check-pre-compiled.shfrom./nextjs/ - run
yarn build:nextjsfrom root - Try linting again
~/c/blitz> yarn lint
yarn run v1.22.10
$ eslint --ext ".js,.ts,.tsx" .
Oops! Something went wrong! :(
ESLint: 7.21.0
Error: Failed to load parser './parser.js' declared in 'examples/auth/.eslintrc.js » eslint-config-blitz » eslint-config-next': Cannot find module '@babel/parser'
at webpackEmptyContext (/Users/b/c/blitz/nextjs/packages/next/dist/compiled/babel/bundle.js:1:33258)
at Object.73139 (/Users/b/c/blitz/nextjs/packages/next/dist/compiled/babel/bundle.js:2194:783181)
at __nccwpck_require__ (/Users/b/c/blitz/nextjs/packages/next/dist/compiled/babel/bundle.js:2194:1065271)
at Object.eslintParser (/Users/b/c/blitz/nextjs/packages/next/dist/compiled/babel/bundle.js:1:43676)
at Object.<anonymous> (/Users/b/c/blitz/nextjs/packages/next/dist/compiled/babel/eslint-parser.js:1:100)
at Module._compile (/Users/b/c/blitz/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
error Command failed with exit code 2.
Failed to compile - LICENSE
This error occurs sometimes when you import code from packages/next/build/utils.ts into some other code like config-shared.ts. Solution is to move the code into another file.
Failed to compile.
../../../packages/next/dist/compiled/webpack/LICENSE
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See webpack.js.org/concepts#loaders
> Copyright JS Foundation and other contributors
|
| Permission is hereby granted, free of charge, to any person obtaining