Skip to content

Commit

Permalink
Yarn to npm (#1774)
Browse files Browse the repository at this point in the history
* Change yarn to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* Changed the contributing guide use to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* fixed the autoformat from vscode

* updated the build.yml to now work npm commands

* fixed the update-dependencies

* try using npm 7 with all node versions

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: David Goss <david@davidgoss.co>
  • Loading branch information
3 people committed Aug 22, 2021
1 parent d3c8569 commit 2bdeec4
Show file tree
Hide file tree
Showing 5 changed files with 12,835 additions and 4,282 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Expand Up @@ -22,8 +22,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn test
- run: npm i -g npm@7
- run: npm install
- run: npm test

coverage:
runs-on: ubuntu-latest
Expand All @@ -32,8 +33,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: yarn install
- run: yarn test-coverage
- run: npm install
- run: npm run test-coverage
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,4 +46,4 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: yarn audit --groups dependencies
- run: npm audit --groups dependencies
27 changes: 13 additions & 14 deletions CONTRIBUTING.md
Expand Up @@ -11,27 +11,27 @@ You can chat with us in the [#committers-js](https://cucumberbdd.slack.com/archi

## Setup

* install [Node.Js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/)
* `yarn install` - Install dependencies
* `yarn test` - Compile typescript and run the tests
* install [Node.Js](https://nodejs.org/en/)
* `npm install` - Install dependencies
* `npm test` - Compile typescript and run the tests

## Tests

Now type `yarn run` or see the `package.json` scripts section for how to run each category of tests.
Now type `npm run` or see the `package.json` scripts section for how to run each category of tests.

* lint - `yarn lint`
* lint - `npm run lint`
* [prettier](https://github.com/prettier/prettier)
* [eslint](https://eslint.org/)
* [dependency-lint](https://github.com/charlierudolph/dependency-lint)
* typescript tests - `yarn types-test`
* typescript tests - `npm run types-test`
* [tsd](https://github.com/SamVerschueren/tsd)
* unit tests - `yarn unit-test`
* unit tests - `npm run unit-test`
* [mocha](https://mochajs.org/)
* [chai](https://www.chaijs.com/)
* [sinon](https://sinonjs.org/)
* compatibility kit - `yarn cck-test`
* compatibility kit - `npm run cck-test`
* checking that cucumber-js emits the [correct messages](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
* feature tests - `yarn feature-test`
* feature tests - `npm run feature-test`
* cucumber-js tests itself

## Internals
Expand Down Expand Up @@ -85,16 +85,15 @@ Start the container:

make docker-run

Inside the container, install the correct versions of Node and Yarn:
Inside the container, install the correct version of Node:

nvm install --lts
npm install -g yarn

Then update the dependencies and test:

yarn update-dependencies
yarn
yarn test
npm run update-dependencies
npm run
npm run test

If the tests fail, update your code to be compatible with the new libraries, or revert the library upgrades that break the build.

Expand Down

0 comments on commit 2bdeec4

Please sign in to comment.