mitodl / mitodl/release-script

Consider using `yarn` instead of `npm` to publish JS packages

Open
#371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
16
Forks
8
Avg merge
11h 47m
Merged PRs (30d)
2

Description

Most of our projects use (apps and libraries) use yarn for managing NPM dependencies, but when publishing NPM packages doof uses the npm CLI.

This means:

  1. Doof ignores yarn.lock, and may install different versions of dependencies than we use locally / on CI
  2. Doof's npm install may fail when local / CI yarn install succeeds. This happened recently in course-search-utils because of a difference in how npm vs yarn treat incorrectly met peer dependencies. See https://github.com/mitodl/course-search-utils/pull/61

Neither of these is a big deal. In fact, (1) does not matter at all for pure-JS packages with no build, since transitive dependency versions are controlled by the consumer, not by the library. (In theory, yarn.lock could affect the output of a build step, though.)

But as we update doof, it may be worth considering using yarn for the installation step.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating doof's package-installation step and read course-search-utils PR 61 for the npm-versus-yarn failure described here. Compare the current release flow with the projects' yarn-based installs; done means the chosen installation approach respects the intended dependency behavior and publishing still succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.