Skip to content

Commit

Permalink
chore: update to yarn3
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 2, 2023
1 parent a9a5659 commit c0ad4e4
Show file tree
Hide file tree
Showing 9 changed files with 7,704 additions and 3,864 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
else
PACKAGE_NAME=$(yarn info -s . name)
PUBLISHED_VERSION=$(yarn info -s $PACKAGE_NAME version)
PUBLISHED_VERSION=$(yarn npm info --json . | jq -c '.version' -r) and remove the PACKAGE_NAME=$(yarn info -s . name)
THIS_VERSION=$(node -p "require('./package.json').version")
# Simple bash helper to comapre version numbers
verlte() {
Expand Down Expand Up @@ -120,12 +120,14 @@ jobs:
- name: Publish to NPM
if: ${{ steps.do-publish.outputs.tag }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
yarn config set npmAuthToken $NPM_AUTH_TOKEN
NEW_VERSION=$(node -p "require('./package.json').version")
yarn publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag ${{ steps.do-publish.outputs.tag }}
yarn npm publish --access=public --tag ${{ steps.do-publish.outputs.tag }}
echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true

validate-dependencies:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ jobs:
- name: Publish to NPM
if: ${{ steps.do-publish.outputs.publish }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
yarn config set npmAuthToken $NPM_AUTH_TOKEN
NEW_VERSION=$(node -p "require('./package.json').version")
yarn publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag "${{ steps.do-publish.outputs.publish }}"
yarn npm publish --access=public --tag "${{ steps.do-publish.outputs.publish }}"
echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ node_modules
package-lock.json
yarn-error.log
/lib
/dist
/dist

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.6.3.cjs
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@
"types": "dist/index.d.ts",
"scripts": {
"prepare": "husky install",
"build": "rimraf dist && yarn build:main",
"build": "rimraf dist && run build:main",
"build:main": "tsc -p tsconfig.build.json",
"lint:raw": "eslint --ext .ts --ext .js --ext .tsx --ext .jsx --ignore-pattern dist",
"lint": "yarn lint:raw .",
"lint-fix": "yarn lint --fix",
"lint:raw": "run eslint --ext .ts --ext .js --ext .tsx --ext .jsx --ignore-pattern dist",
"lint": "run lint:raw .",
"lint-fix": "run lint --fix",
"unit": "jest --coverage",
"test": "yarn lint && jest test",
"test:coverage": "yarn test -- --coverage",
"test": "run lint && jest test",
"test:coverage": "run test -- --coverage",
"cov": "jest --coverage; open-cli coverage/lcov-report/index.html",
"cov-open": "open-cli coverage/lcov-report/index.html",
"changelog": "yarn sofie-version",
"release": "yarn reset && yarn test && yarn sofie-version",
"changelog": "sofie-version",
"release": "run reset && run test && sofie-version",
"reset": "git clean -dfx && git reset --hard && yarn",
"validate:dependencies": "yarn audit --groups dependencies && yarn license-validate",
"validate:dev-dependencies": "yarn audit --groups devDependencies",
"license-validate": "yarn sofie-licensecheck --allowPackages caniuse-lite@1.0.30001426"
"validate:dependencies": "yarn npm audit --environment production && run license-validate",
"validate:dev-dependencies": "yarn npm audit --environment development",
"license-validate": "sofie-licensecheck --allowPackages caniuse-lite@1.0.30001541",

"eslint": "./node_modules/.bin/eslint",
"prettier": "./node_modules/.bin/prettier",
"lint-staged": "./node_modules/.bin/lint-staged"
},
"contributors": [
"Gilles Dufour <dufour.gilles@gmail.com> (www.gdnet.be)",
Expand Down Expand Up @@ -62,20 +66,18 @@
"url": "https://github.com/nrkno/sofie-emberplus-connection/issues"
},
"homepage": "https://github.com/nrkno/sofie-emberplus-connection#readme",
"directories": {
"test": "test"
},
"keywords": [
"emberplus",
"lawo"
],
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"lint-staged": {
"*.{css,json,md,scss}": [
"prettier --write"
"yarn prettier --write"
],
"*.{ts,tsx,js,jsx}": [
"yarn lint:raw --fix"
]
}
},
"packageManager": "yarn@3.6.3"
}
Loading

0 comments on commit c0ad4e4

Please sign in to comment.