Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make
create-dapp
compatible with yarn4 (#9976)
closes: #XXXX refs: #9852 ## Description As described in the issue linked above, currently, if a user has yarn4 and they run `yarn create @agoric/dapp demo` the command fails because it uses pnp as the linker by default. The correct way to go about it imo is to properly document that if a user is using yarn4, they have to configure it to use `node-modules` as its `nodeLinker`. This can either be done by creating a `.yarnrc.yml` in the directory they are supposedly running the `yarn create` command, or by globally configuring it via `yarn config set nodeLinker node-modules` bumping the agoric package is needed for yarn4 otherwise it throws an [error](#9852 (comment)) ## Steps to Test ### Publishing to a local, private registry 1. install and start verdaccio 2. set npm registry server to the localhost address exposed by verdaccio ``` npm config set registry http://localhost:4873/ ``` 3. inside the create-dapp folder, run ``` npm publish ``` you may have to auth a user. You can use `npm adduser` and provide test username, password (for verdaccio). You can also explicitly publish to your private registry using `npm publish --registry=http://localhost:4873` ### Downloading the package from local registry 1. Set nodeLinker to node-modules: ``` yarn config set nodeLinker node-modules ``` 2. point npmRegistryServer to localhost: ``` yarn config get npmRegistryServer ``` 3. add localhost to unsafe http whitelist: ``` yarn config set unsafeHttpWhitelist 'localhost' ``` 4. pull the package using ``` yarn create @agoric/dapp demo ``` Ensure the package being pulled is the one you published by matching the package version. P.S. the above can be achieved by using a `.yarnrc.yml` with the same configuration as well. But for the above instructions, please don't forget to set them to their defaults after testing :) ### Security Considerations ### Scaling Considerations ### Documentation Considerations Add a section on docs site while setting up yarn to properly configure nodeLinker ### Testing Considerations TODO: add CI step to test package download using different yarn versions via [verdaccio](https://verdaccio.org/) ### Upgrade Considerations
- Loading branch information