Skip to content

Commit

Permalink
Merge pull request #160 from nrkno/chore/update-yarn
Browse files Browse the repository at this point in the history
chore: update to yarn 4 & Node 18
  • Loading branch information
nytamin authored Mar 21, 2024
2 parents dd720ac + 8d29f0c commit 5836f20
Show file tree
Hide file tree
Showing 34 changed files with 13,672 additions and 9,127 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'

- name: Enable Corepack
run: corepack enable

- name: Run build
env:
CI: true
PKG_CACHE_PATH: ${{ runner.temp }}
run: |
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn do:build-win32:ci
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'

- name: Enable Corepack
run: corepack enable

- name: Cache node_modules
uses: actions/cache@v4
with:
Expand All @@ -30,7 +35,6 @@ jobs:

- name: Prepare Environment
run: |
yarn config set network-timeout 100000 -g
yarn
env:
CI: true
Expand All @@ -50,25 +54,29 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: ['16']
node_version: ['18', '20']
os: [ubuntu-latest, windows-latest] # [windows-latest, macOS-latest]
timeout-minutes: 10
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- name: Cache node_modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Enable Corepack
run: corepack enable

- name: Prepare Environment
run: |
yarn config set network-timeout 100000 -g
yarn
yarn build
env:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: ['16']
node_version: ['18']
os: [ubuntu-latest, windows-latest] # [windows-latest, macOS-latest]
timeout-minutes: 10
steps:
Expand All @@ -24,7 +24,6 @@ jobs:

- name: Prepare Environment
run: |
yarn config set network-timeout 100000 -g
yarn
yarn build
env:
Expand All @@ -50,7 +49,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Check release is desired
id: do-publish
run: |
Expand All @@ -66,7 +65,6 @@ jobs:
- name: Prepare Environment
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn config set network-timeout 100000 -g
yarn
env:
CI: true
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ node_modules
.pnp
.pnp.js

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# testing
coverage

Expand Down
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.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 @@
compressionLevel: mixed

enableGlobalCache: false

httpTimeout: 100000

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
4 changes: 2 additions & 2 deletions apps/_boilerplate/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Boilerplace",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs boilerplate.exe && node ../../../scripts/copy-natives.js win32-x64",
"__test": "jest",
Expand All @@ -15,7 +15,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/_boilerplate/packages/generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"__test": "jest"
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/appcontainer-node/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "AppContainer-Node.js",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs appContainer-node.exe && node ../../../scripts/copy-natives.js win32-x64",
"__test": "jest",
Expand All @@ -15,7 +15,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/appcontainer-node/packages/generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"__test": "jest"
},
Expand All @@ -22,7 +22,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/http-server/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as builder
FROM node:18-alpine as builder

# Note: Build this from the root directory:
# cd package-manager
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN rm -r scripts


# Create deploy-image:
FROM node:16-alpine
FROM node:18-alpine

COPY --from=builder /src /src

Expand Down
4 changes: 2 additions & 2 deletions apps/http-server/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Upload to and serve proxies of packages",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs http-server.exe && node ../../../scripts/copy-natives.js win32-x64",
"__test": "jest",
Expand All @@ -15,7 +15,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/http-server/packages/generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"__test": "jest"
},
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/package-manager/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.50.0",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs package-manager.exe && node ../../../scripts/copy-natives.js win32-x64",
"__test": "jest",
Expand All @@ -14,7 +14,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/package-manager/packages/generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"test": "jest"
},
Expand All @@ -30,7 +30,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
4 changes: 2 additions & 2 deletions apps/quantel-http-transformer-proxy/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as builder
FROM node:18-alpine as builder

# Note: Build this from the root directory:
# cd package-manager
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN rm -r scripts


# Create deploy-image:
FROM node:16-alpine
FROM node:18-alpine

COPY --from=builder /src /src

Expand Down
4 changes: 2 additions & 2 deletions apps/quantel-http-transformer-proxy/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Proxy for a Quantel HTTP Transformer",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs quantel-http-transformer-proxy.exe && node ../../../scripts/copy-natives.js win32-x64",
"start": "node dist/index.js"
Expand All @@ -14,7 +14,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"__test": "jest"
},
Expand Down Expand Up @@ -43,7 +43,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
8 changes: 4 additions & 4 deletions apps/single-app/app/expectedPackages.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
"expectedPackages": [
{
"type": "media_file",
"_id": "test9902",
"_id": "test",
"contentVersionHash": "abc1234",
"content": {
"filePath": "test2.mxf"
"filePath": "amb.mp4"
},
"version": {},
"sources": [
Expand All @@ -88,7 +88,7 @@
"accessors": {
"local": {
"type": "local_folder",
"filePath": "test2.mxf"
"filePath": "amb.mp4"
}
}
}
Expand All @@ -101,7 +101,7 @@
"previewPackageSettings": null,
"thumbnailContainerId": "thumbnails0_local",
"thumbnailPackageSettings": {
"path": "test2.png"
"path": "thumbnail.png"
},
"loudnessPackageSettings": {
"channelSpec": [
Expand Down
4 changes: 2 additions & 2 deletions apps/single-app/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Package Manager, http-proxy etc.. all in one application",
"private": true,
"scripts": {
"build": "yarn rimraf dist && yarn build:main",
"build": "run -T rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"build-win32": "mkdir deploy & node ../../../scripts/build-win32.mjs package-manager-single-app.exe && node ../../../scripts/copy-natives.js win32-x64",
"__test": "jest",
Expand All @@ -22,7 +22,7 @@
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
"engines": {
"node": ">=14.18.0"
"node": ">=18"
},
"lint-staged": {
"*.{js,css,json,md,scss}": [
Expand Down
Loading

0 comments on commit 5836f20

Please sign in to comment.