From 9a1a49c8323a18ef4020e37d52b7f0c4f9a67848 Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Tue, 11 Feb 2025 21:24:01 -0700 Subject: [PATCH 1/6] chore: update license date --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a59b9d0..7257635 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Flowplayer +Copyright (c) 2025 Flowplayer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From ff262a5a800a6faf144bfb07b325131ce940f99c Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Tue, 11 Feb 2025 21:26:02 -0700 Subject: [PATCH 2/6] chore: optimize tsconfig for library publishing --- package.json | 3 ++- tsconfig.json | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7545502..d4f5e9f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "author": "Flowplayer AB ", "license": "MIT", "private": false, + "types": "index.d.ts", "scripts": { "build": "tsc -d", "dev": "webpack serve -c demo/webpack.config.js", @@ -38,4 +39,4 @@ "lib/*.js", "lib/*.d.ts" ] -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 55c9ee6..d0c60dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,12 +7,14 @@ "test/**/*.test-d.tsx" // we have a separate task where types are tested ], "compilerOptions": { - "target": "es2015", + "allowSyntheticDefaultImports": true, + "declaration": true, "jsx": "react", + "moduleResolution": "node", + "outDir": "./lib", + "rootDir": ".", "skipLibCheck": true, - "allowSyntheticDefaultImports": true, "strict": true, - "outDir": "./lib", - "moduleResolution": "node" + "target": "es2015", } } \ No newline at end of file From 646ef876ec41fe597d76ffc6f6b6a572e8c2a624 Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Wed, 12 Feb 2025 18:05:22 -0700 Subject: [PATCH 3/6] chore: move demo index into public folder --- demo/{ => public}/index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename demo/{ => public}/index.html (100%) diff --git a/demo/index.html b/demo/public/index.html similarity index 100% rename from demo/index.html rename to demo/public/index.html From f3d08cc46add84321a2ff26f216dc16525b39de9 Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Wed, 12 Feb 2025 18:05:51 -0700 Subject: [PATCH 4/6] chore: add local actions secrets file to gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c3bd9d7..405e475 100644 --- a/.gitignore +++ b/.gitignore @@ -104,4 +104,5 @@ dist .tern-port lib -.DS_Store \ No newline at end of file +.DS_Store +.secrets From 05e395055f945dfe48c76b8a43bacdf17becf3ae Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Wed, 12 Feb 2025 18:13:50 -0700 Subject: [PATCH 5/6] fix: align output directory and root dir --- demo/webpack.config.js | 4 ++-- tsconfig.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/demo/webpack.config.js b/demo/webpack.config.js index f9ac04a..c622de7 100644 --- a/demo/webpack.config.js +++ b/demo/webpack.config.js @@ -31,11 +31,11 @@ module.exports = { }, output: { filename: "[name].js", - path: path.resolve(__dirname, "dist") + path: path.resolve(__dirname, "public") }, devServer: { static: { - directory: path.resolve(__dirname) + directory: path.resolve(__dirname, "public") } } } diff --git a/tsconfig.json b/tsconfig.json index d0c60dd..178193b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,11 +8,10 @@ ], "compilerOptions": { "allowSyntheticDefaultImports": true, - "declaration": true, + "declaration": false, "jsx": "react", "moduleResolution": "node", "outDir": "./lib", - "rootDir": ".", "skipLibCheck": true, "strict": true, "target": "es2015", From 72a61fb509fb66620e6241df2cc3b42b6cab85d9 Mon Sep 17 00:00:00 2001 From: rj-wowza Date: Wed, 12 Feb 2025 18:14:32 -0700 Subject: [PATCH 6/6] fix: github pages deployment --- .github/workflows/deploy.yml | 56 +++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c8ed52d..59d4ff9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,47 +1,49 @@ name: deploy on: - push: + pull_request: branches: - main + types: + - closed +permissions: + id-token: write + contents: read + pages: write +concurrency: + group: pages + cancel-in-progress: false jobs: - build: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 + cache: yarn - id: yarn-cache-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - run: yarn install --immutable - - run: yarn demo - - id: deployment - uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action + - name: Build demo page + run: | + yarn install --immutable + yarn demo + - name: Upload demo page + uses: actions/upload-pages-artifact@v3 with: - path: demo/dist/ - - # Deploy job - deploy: - # Add a dependency to the build job - needs: build - - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Specify runner + deployment step - runs-on: ubuntu-latest - steps: + path: './demo/public' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action - env: - name: preview - url: ${{ steps.deployment.outputs.page_url }} + uses: actions/deploy-pages@v4 + # - name: Publish to NPMJS + # uses: JS-DevTools/npm-publish@v3 + # with: + # token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file