Skip to content

Commit

Permalink
Replace yarn with pnpm and upgrade all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjwest committed Mar 26, 2023
1 parent 8d6936b commit c4fe666
Show file tree
Hide file tree
Showing 5 changed files with 2,779 additions and 2,745 deletions.
65 changes: 33 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ orbs:
coveralls: coveralls/coveralls@1.0.6

references:
yarn-cache-key-latest: &yarn-cache-key-latest
v1-dependency-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}-latest
yarn-cache-key: &yarn-cache-key
v1-dependency-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
yarn-backup-cache-key: &yarn-backup-cache-key
v1-dependency-yarn-{{ .Branch }}-
yarn-backup-cache-key-no-branch: &yarn-backup-cache-key-no-branch
v1-dependency-yarn-
pnpm-cache-key-latest: &pnpm-cache-key-latest
v1-dependency-pnpm-{{ .Branch }}-{{ checksum "pnpm-lock.yaml" }}-latest
pnpm-cache-key: &pnpm-cache-key
v1-dependency-pnpm-{{ .Branch }}-{{ checksum "pnpm-lock.yaml" }}
pnpm-backup-cache-key: &pnpm-backup-cache-key
v1-dependency-pnpm-{{ .Branch }}-
pnpm-backup-cache-key-no-branch: &pnpm-backup-cache-key-no-branch
v1-dependency-pnpm-

node-14: &node-14
cimg/node:14.21.1
Expand All @@ -33,68 +33,69 @@ commands:
install-dependencies:
steps:
- run:
name: Yarn version
command: yarn --version
name: PNPM version
command: pnpm --version
- restore_cache:
name: Restore pnpm cache
keys:
- *yarn-cache-key
- *yarn-backup-cache-key
- *yarn-backup-cache-key-no-branch
- *pnpm-cache-key
- *pnpm-backup-cache-key
- *pnpm-backup-cache-key-no-branch
- run:
name: Install dependencies
command: yarn install --frozen-lockfile
command: pnpm install
- save_cache:
name: Save yarn package cache
key: *yarn-cache-key
name: Save pnpm cache
key: *pnpm-cache-key
paths:
- ~/.cache/yarn
- node_modules

install-dependencies-latest:
steps:
- run:
name: Yarn version
command: yarn --version
name: PNPM version
command: pnpm --version
- restore_cache:
keys:
- *yarn-cache-key-latest
- *yarn-cache-key
- *yarn-backup-cache-key
- *yarn-backup-cache-key-no-branch
- *pnpm-cache-key-latest
- *pnpm-cache-key
- *pnpm-backup-cache-key
- *pnpm-backup-cache-key-no-branch
- run:
name: Upgrade dependencies lockfile and install
command: yarn upgrade
command: pnpm update
- run:
name: Output dependencies diff
command: git --no-pager diff
- save_cache:
name: Save yarn package cache
key: *yarn-cache-key-latest
name: Save pnpm cache
key: *pnpm-cache-key-latest
paths:
- ~/.cache/yarn
- node_modules

checks:
steps:
- run:
name: Lint Typescript code
command: yarn lint
command: pnpm lint
- run:
name: Audit production dependencies
command: yarn audit-dependencies
command: pnpm audit --prod

build:
steps:
- run:
name: Build project
command: yarn build
command: pnpm build

tests:
steps:
- run:
name: TS Unit tests
command: yarn test:coverage
command: pnpm test:coverage
- run:
name: Test documentation snippets
command: yarn test:snippets
command: pnpm test:snippets
- store_artifacts:
path: coverage
- store_test_results:
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Nice assertions for sinon stubs.
```bash
npm install sinon-assert-stub
```
or
```bash
yarn add sinon-assert-stub
```

## Usage

Expand Down Expand Up @@ -158,7 +154,6 @@ stub('foo');
stub('bar', 'zim');
```


[npm-badge]: https://badge.fury.io/js/sinon-assert-stub.svg
[npm-url]: https://www.npmjs.com/package/sinon-assert-stub

Expand Down
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,29 @@
"license": "MIT",
"homepage": "https://github.com/peterjwest/sinon-assert-stub#readme",
"scripts": {
"audit-dependencies": "yarn audit; [[ $? -ge 4 ]] && exit 1 || exit 0",
"build": "rm -rf build/code && tsup src/index.ts --format cjs,esm --dts --out-dir build/code",
"lint": "eslint .",
"test:coverage": "vitest run --coverage",
"test:unit": "vitest run",
"test:snippets": "test-snippets"
"test:snippets": "test-snippets",
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
"sinon": "^15.0.2"
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/eslint-parser": "^7.21.3",
"@types/node": "^18.15.10",
"@types/sinon": "^10.0.13",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"sinon": "^11.1.1"
},
"devDependencies": {
"@types/node": "^15.6.1",
"@types/sinon": "^10.0.1",
"@vitest/coverage-c8": "^0.29.7",
"mocha-circleci-reporter": "^0.0.3",
"test-snippets": "^0.3.0",
"eslint": "^8.36.0",
"test-snippets": "^1.0.0",
"tsup": "^6.7.0",
"tsx": "^3.12.6",
"typescript": "^4.3.2",
"typescript": "^5.0.2",
"vitest": "^0.29.7"
}
}

0 comments on commit c4fe666

Please sign in to comment.