Skip to content
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: use protons and update project config #140

Conversation

achingbrain
Copy link
Collaborator

Before merging this:

  1. Check npm config of https://www.npmjs.com/package/@chainsafe/libp2p-noise - "Publishing access" should be set to "Require two-factor authentication or automation tokens"
  2. Create a repository secret here called NPM_TOKEN with a npm automation token that can publish to @chainsafe/libp2p-noise.
  3. Add https://github.com/web3-bot as a collaborator to this repo to receive automated CI config updates

- Swaps protobufjs for protons so we can generate `.ts` from `.proto` that is browser friendly (e.g. uses bigints instead of long.js, etc) and isn't broken by default
- Updates project config to add autorelease in the [unified CI model](https://github.com/protocol/.github)
@achingbrain
Copy link
Collaborator Author

achingbrain commented Apr 11, 2022

Yarn.

So, for some reason, [email protected] consistently symlinks the wrong tsc binary in node_modules/.bin.

The dep tree is:

@chainsafe/[email protected] /Users/alex/Documents/Workspaces/ChainSafe/js-libp2p-noise
└─┬ [email protected]
.. other deps
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └─┬ [email protected]
  │     └── [email protected]
.. other deps
 └── [email protected]

It finds [email protected] as a dep of detective-typescript instead of [email protected] as a dep of aegir.

This is a problem because [email protected] doesn't support the right values for the lib option and compiling the typescript code fails.

One solution might be to add a redundant typescript dep to this module and hope that the dependency resolution algorithm would choose that one to symlink, though it's a bad solution because it's not used directly here, plus you'd then need to keep it in sync with the aegir version which is extra work no-one needs.

Unified CI uses npm and not yarn, so I've removed yarn.lock since it's redundant from a CI point of view but there's nothing to stop people using yarn if they want to, though at the moment it seems to have a bug in it.

@achingbrain
Copy link
Collaborator Author

I have split this into two PRs - #141 and #142

@achingbrain achingbrain deleted the fix/use-protons-and-update-project-config branch April 11, 2022 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant