build: migrate workflow and npm scripts to use pnpm; add pnpm-lock; add es2016 tsconfig lib

This commit is contained in:
actuallylost 2025-09-27 15:33:31 +03:00
parent 90f834e893
commit f3a14403de
No known key found for this signature in database
GPG key ID: 8A8DE205A268EF2C
6 changed files with 11049 additions and 15573 deletions

View file

@ -5,7 +5,7 @@ on:
branches: branches:
- development - development
tags-ignore: tags-ignore:
- '**' - "**"
pull_request: pull_request:
branches: branches:
- development - development
@ -21,19 +21,25 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Setup node - name: Setup node
uses: actions/setup-node@v5 uses: actions/setup-node@v5
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: "pnpm"
- name: Install NPM dependencies - name: Install NPM dependencies
run: npm ci run: pnpm install
- name: Build - name: Build
run: npm run build run: pnpm build
- name: Test - name: Test
run: npm test run: pnpm test
- name: Lint - name: Lint
run: npm run lint run: pnpm lint
# Create recursivelly the destiantion dir with # Create recursively the destination dir with
# "--parrents where no error if existing, make parent directories as needed." # "--parrents where no error if existing, make parent directories as needed."
- run: mkdir -p ./build/${{ github.head_ref || github.ref_name }} - run: mkdir -p ./build/${{ github.head_ref || github.ref_name }}
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages

View file

@ -11,11 +11,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install NPM dependencies - name: Install NPM dependencies
run: npm install run: pnpm install
- name: Build - name: Build
env: env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: npm run build run: pnpm build
- name: Zip build artifact - name: Zip build artifact
run: zip -r stremio-web.zip ./build run: zip -r stremio-web.zip ./build
- name: Upload build artifact to GitHub release assets - name: Upload build artifact to GitHub release assets
@ -25,4 +25,4 @@ jobs:
file: stremio-web.zip file: stremio-web.zip
asset_name: stremio-web.zip asset_name: stremio-web.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

15562
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@
"build": "webpack --mode production", "build": "webpack --mode production",
"test": "jest", "test": "jest",
"lint": "eslint src", "lint": "eslint src",
"scan-translations": "npx jest ./tests/i18nScan.test.js" "scan-translations": "pnpx jest ./tests/i18nScan.test.js"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "7.26.0", "@babel/runtime": "7.26.0",

11032
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["DOM", "DOM.Iterable"], "lib": [ "ES2016", "DOM", "DOM.Iterable"],
"jsx": "react", "jsx": "react",
"baseUrl": "./src", "baseUrl": "./src",
"outDir": "./dist", "outDir": "./dist",