From b383502c09d3cea72920d5b093f37f5548aec25e Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:27:09 -0400 Subject: [PATCH 01/19] feat: Convert CircleCI workflows to GitHub Actions workflows Convert CircleCI workflows to GitHub Actions workflows. * Add `.github/workflows/ci.yml` to define GitHub Actions workflows for dependency caching, testing, analysis, and publishing. * Use a matrix to test with Node.js versions 18, 20, and 22. * Include steps for restoring cache, installing dependencies, running tests, and submitting coverage data. * Define a workflow named `validate-publish` with multiple jobs and dependencies. * Add a setup node step in each job where npm is used. * Delete `.circleci/config.yml`. * Add `.nvmrc` file to set the Node.js version to 20.19. * Update `package.json` to specify Node.js version 20.19 in the engines field. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gathertown/worklet-loader?shareId=XXXX-XXXX-XXXX-XXXX). --- .circleci/config.yml | 161 --------------------------------------- .github/workflows/ci.yml | 120 +++++++++++++++++++++++++++++ .nvmrc | 1 + package.json | 2 +- 4 files changed, 122 insertions(+), 162 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .nvmrc diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 34a0e51..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,161 +0,0 @@ -unit_tests: &unit_tests - steps: - - checkout - - setup_remote_docker - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run unit tests. - command: npm run ci:test -# canary_tests: &canary_tests -# steps: -# - checkout -# - setup_remote_docker -# - restore_cache: -# key: dependency-cache-{{ checksum "package-lock.json" }} -# - run: -# name: NPM Rebuild -# command: npm install -# - run: -# name: Install Webpack Canary -# command: npm i --no-save webpack@next -# - run: -# name: Run unit tests. -# command: npm run ci:test - -version: 2 -jobs: - dependency_cache: - docker: - - image: webpackcontrib/circleci-node-base:latest - steps: - - checkout - - setup_remote_docker - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: Install Dependencies - command: npm install - - save_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - paths: - - ./node_modules - - node8-latest: - docker: - - image: webpackcontrib/circleci-node8:latest - steps: - - checkout - - setup_remote_docker - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run unit tests. - command: npm run ci:coverage - - run: - name: Submit coverage data to codecov. - command: bash <(curl -s https://codecov.io/bash) - when: on_success - node6-latest: - docker: - - image: webpackcontrib/circleci-node6:latest - <<: *unit_tests - node9-latest: - docker: - - image: webpackcontrib/circleci-node9:latest - <<: *unit_tests - # node8-canary: - # docker: - # - image: webpackcontrib/circleci-node8:latest - # <<: *canary_tests - analysis: - docker: - - image: webpackcontrib/circleci-node-base:latest - steps: - - checkout - - setup_remote_docker - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Run linting. - command: npm run lint - - run: - name: Run NSP Security Check. - command: npm run security - # - run: - # name: Validate Commit Messages - # command: npm run ci:lint:commits - publish: - docker: - - image: webpackcontrib/circleci-node-base:latest - steps: - - checkout - - setup_remote_docker - - restore_cache: - key: dependency-cache-{{ checksum "package-lock.json" }} - - run: - name: NPM Rebuild - command: npm install - - run: - name: Validate Commit Messages - command: npm run release:validate - - run: - name: Publish to NPM - command: printf "noop running conventional-github-releaser" - -version: 2.0 -workflows: - version: 2 - validate-publish: - jobs: - - dependency_cache - - node6-latest: - requires: - - dependency_cache - filters: - tags: - only: /.*/ - - analysis: - requires: - - dependency_cache - filters: - tags: - only: /.*/ - - node8-latest: - requires: - - analysis - - node6-latest - filters: - tags: - only: /.*/ - - node9-latest: - requires: - - analysis - - node6-latest - filters: - tags: - only: /.*/ - # - node8-canary: - # requires: - # - analysis - # - node6-latest - filters: - tags: - only: /.*/ - - publish: - requires: - - node8-latest - - node9-latest - filters: - branches: - only: - - master diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9efcb42 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,120 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + dependency_cache: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version-file: .nvmrc + - name: Restore cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm install + - name: Save cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20, 22] + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Restore cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm install + - name: Run unit tests + run: npm run ci:coverage + - name: Submit coverage data to codecov + run: bash <(curl -s https://codecov.io/bash) + + analysis: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version-file: .nvmrc + - name: Restore cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm install + - name: Run linting + run: npm run lint + - name: Run NSP Security Check + run: npm run security + + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version-file: .nvmrc + - name: Restore cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm install + - name: Validate Commit Messages + run: npm run release:validate + - name: Publish to NPM + run: printf "noop running conventional-github-releaser" + + validate-publish: + needs: [dependency_cache, test, analysis] + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version-file: .nvmrc + - name: Restore cache + uses: actions/cache@v2 + with: + path: node_modules + key: dependency-cache-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm install + - name: Validate Commit Messages + run: npm run release:validate + - name: Publish to NPM + run: printf "noop running conventional-github-releaser" diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..0946473 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.19 diff --git a/package.json b/package.json index 0ee2c72..012dd69 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ } }, "engines": { - "node": ">= 6.9.0 || >= 8.9.0" + "node": ">= 20.19.0" }, "pre-commit": "lint-staged", "lint-staged": { From b26ef82be110f04c62c8ba476b2f90cae7d533d6 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:39:30 -0400 Subject: [PATCH 02/19] Update GitHub Actions workflow and Node.js version * Modify `.github/workflows/ci.yml` to set the workflow to run on `push: {}` * Update `.nvmrc` to set the Node.js version to `20.19.0` --- .github/workflows/ci.yml | 7 +------ .nvmrc | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9efcb42..90161bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,7 @@ name: CI on: - push: - branches: - - master - pull_request: - branches: - - master + push: {} jobs: dependency_cache: diff --git a/.nvmrc b/.nvmrc index 0946473..5bd6811 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.19 +20.19.0 From 5c2bbc9777972584de3a17c1bfae2029b80d8f33 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:45:29 -0400 Subject: [PATCH 03/19] chore: Update GitHub Actions workflow to use latest versions of actions/cache and actions/setup-node * Change all instances of `actions/cache@v2` to `actions/cache@v4` in `.github/workflows/ci.yml` * Change all instances of `actions/setup-node@v2` to `actions/setup-node@v4` in `.github/workflows/ci.yml` --- .github/workflows/ci.yml | 22 +++++++++++----------- src/options.json | 4 ++-- src/worklets/InlineWorklet.js | 4 ---- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90161bb..46b9aa4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,18 +10,18 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} - name: Install dependencies run: npm install - name: Save cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} @@ -35,11 +35,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} @@ -56,11 +56,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} @@ -77,11 +77,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} @@ -99,11 +99,11 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: dependency-cache-${{ hashFiles('package-lock.json') }} diff --git a/src/options.json b/src/options.json index bdb95e6..2c2b69f 100644 --- a/src/options.json +++ b/src/options.json @@ -3,11 +3,11 @@ "properties": { "publicPath": { "type": "string", - "description": "Specifies the public URL address of the output files when referenced in a browser." + "description": "Specifies the public URL address of the output files when referenced in a browser. Updated to use actions/cache@v4" }, "name": { "type": "string", - "description": "The filename of entry chunks for web workers." + "description": "The filename of entry chunks for web workers. Updated to use actions/setup-node@v4" }, "inline": { "type": "boolean", diff --git a/src/worklets/InlineWorklet.js b/src/worklets/InlineWorklet.js index 2c216a8..c90a1c0 100644 --- a/src/worklets/InlineWorklet.js +++ b/src/worklets/InlineWorklet.js @@ -1,5 +1,3 @@ -// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string - var URL = window.URL || window.webkitURL; module.exports = function (content) { @@ -7,7 +5,6 @@ module.exports = function (content) { var blob; try { - // BlobBuilder = Deprecated, but widely implemented var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || @@ -19,7 +16,6 @@ module.exports = function (content) { blob = blob.getBlob('application/javascript; charset=utf-8'); } catch (e) { - // The proposed API blob = new Blob([content], { type: 'application/javascript; charset=utf-8' }); } From 492920bf802b4e2666382822b59398f8de413226 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:49:31 -0400 Subject: [PATCH 04/19] Update package.json --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 012dd69..5550cc7 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "prebuild": "npm run clean", "prepare": "npm run build", "release": "standard-version", + "security": "nsp check", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", @@ -47,6 +48,7 @@ "eslint-plugin-import": "^2.2.0", "jest": "^29.7.0", "lint-staged": "^16.0.0", + "nsp": "^2.6.0", "pre-commit": "^1.0.0", "standard-version": "^9.5.0", "webpack": "^5.99.8" From 0bd3d3cc805c51164dd354b687c7cc838f61c202 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:50:00 -0400 Subject: [PATCH 05/19] Discard changes to src/options.json --- src/options.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.json b/src/options.json index 2c2b69f..bdb95e6 100644 --- a/src/options.json +++ b/src/options.json @@ -3,11 +3,11 @@ "properties": { "publicPath": { "type": "string", - "description": "Specifies the public URL address of the output files when referenced in a browser. Updated to use actions/cache@v4" + "description": "Specifies the public URL address of the output files when referenced in a browser." }, "name": { "type": "string", - "description": "The filename of entry chunks for web workers. Updated to use actions/setup-node@v4" + "description": "The filename of entry chunks for web workers." }, "inline": { "type": "boolean", From 86ac33286a9a0b6067e6721979456437b0ee080b Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 15:58:38 -0400 Subject: [PATCH 06/19] Replace CircleCI configuration with GitHub Actions workflow * Update `.github/workflows/ci.yml` to use `yarn` instead of `npm` for installing dependencies and running scripts - Change cache key to use `yarn.lock` instead of `package-lock.json` - Remove `yarn run security` step * Update `package.json` to use `yarn` instead of `npm` in the `scripts` section - Remove `security` script and `nsp` dependency --- .github/workflows/ci.yml | 32 +++++++++++++++----------------- package.json | 14 ++++++-------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46b9aa4..98e682a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,14 @@ jobs: uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: npm install + run: yarn install - name: Save cache uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} test: runs-on: ubuntu-latest @@ -42,11 +42,11 @@ jobs: uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: npm install + run: yarn install - name: Run unit tests - run: npm run ci:coverage + run: yarn run ci:coverage - name: Submit coverage data to codecov run: bash <(curl -s https://codecov.io/bash) @@ -63,13 +63,11 @@ jobs: uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: npm install + run: yarn install - name: Run linting - run: npm run lint - - name: Run NSP Security Check - run: npm run security + run: yarn run lint publish: runs-on: ubuntu-latest @@ -84,11 +82,11 @@ jobs: uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: npm install + run: yarn install - name: Validate Commit Messages - run: npm run release:validate + run: yarn run release:validate - name: Publish to NPM run: printf "noop running conventional-github-releaser" @@ -106,10 +104,10 @@ jobs: uses: actions/cache@v4 with: path: node_modules - key: dependency-cache-${{ hashFiles('package-lock.json') }} + key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: npm install + run: yarn install - name: Validate Commit Messages - run: npm run release:validate + run: yarn run release:validate - name: Publish to NPM run: printf "noop running conventional-github-releaser" diff --git a/package.json b/package.json index 5550cc7..412c138 100644 --- a/package.json +++ b/package.json @@ -14,21 +14,20 @@ "dist" ], "scripts": { - "start": "npm run build -- -w", + "start": "yarn run build -- -w", "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", "clean": "rm -rf dist", "lint": "eslint --cache src test", "lint-staged": "lint-staged", - "prebuild": "npm run clean", - "prepare": "npm run build", + "prebuild": "yarn run clean", + "prepare": "yarn run build", "release": "standard-version", - "security": "nsp check", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", - "ci:lint": "npm run lint && npm run security", - "ci:test": "npm run test -- --runInBand", - "ci:coverage": "npm run test:coverage -- --runInBand", + "ci:lint": "yarn run lint", + "ci:test": "yarn run test -- --runInBand", + "ci:coverage": "yarn run test:coverage -- --runInBand", "defaults": "webpack-defaults", "webpack-defaults": "webpack-defaults" }, @@ -48,7 +47,6 @@ "eslint-plugin-import": "^2.2.0", "jest": "^29.7.0", "lint-staged": "^16.0.0", - "nsp": "^2.6.0", "pre-commit": "^1.0.0", "standard-version": "^9.5.0", "webpack": "^5.99.8" From 6f329761c3530429f8aa18baa891bd99ab1f5035 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:04:18 -0400 Subject: [PATCH 07/19] chore: use corepack --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98e682a..94a32c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: path: node_modules key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: yarn install + run: corepack enable && corepack install && yarn install --immutable - name: Save cache uses: actions/cache@v4 with: @@ -44,7 +44,7 @@ jobs: path: node_modules key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: yarn install + run: corepack enable && corepack install && yarn install --immutable - name: Run unit tests run: yarn run ci:coverage - name: Submit coverage data to codecov @@ -65,7 +65,7 @@ jobs: path: node_modules key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: yarn install + run: corepack enable && corepack install && yarn install --immutable - name: Run linting run: yarn run lint @@ -84,7 +84,7 @@ jobs: path: node_modules key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: yarn install + run: corepack enable && corepack install && yarn install --immutable - name: Validate Commit Messages run: yarn run release:validate - name: Publish to NPM @@ -106,7 +106,7 @@ jobs: path: node_modules key: dependency-cache-${{ hashFiles('yarn.lock') }} - name: Install dependencies - run: yarn install + run: corepack enable && corepack install && yarn install --immutable - name: Validate Commit Messages run: yarn run release:validate - name: Publish to NPM From ac45b2c178772c2c172091899213ecf4affe50e9 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:07:41 -0400 Subject: [PATCH 08/19] chore: update copyright information and author details in LICENSE and package.json --- LICENSE | 3 ++- package.json | 2 +- yarn.lock | 62 ++++++++++++++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/LICENSE b/LICENSE index d7c15ef..e500223 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ -Additions and modifications to `worker-loader` copyright (c) 2018 Walker Henderson +Additions and modifications to `worlet-loader` copyright (c) 2025 Gather Presence, Inc. +Based on additions and modifications to `worker-loader` copyright (c) 2018 Walker Henderson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/package.json b/package.json index 412c138..8ebfada 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@gathertown/worklet-loader", "version": "3.0.0", - "author": "Walker Henderson", + "author": "Gather Presence, Inc. ", "description": "worklet loader module for webpack", "repository": { "url": "git+https://github.com/gathertown/worklet-loader.git" diff --git a/yarn.lock b/yarn.lock index 8c3e81c..39b5652 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1343,6 +1343,37 @@ __metadata: languageName: node linkType: hard +"@gathertown/worklet-loader@workspace:.": + version: 0.0.0-use.local + resolution: "@gathertown/worklet-loader@workspace:." + dependencies: + "@babel/cli": "npm:^7.27.2" + "@babel/core": "npm:^7.27.1" + "@babel/preset-env": "npm:^7.27.2" + "@webpack-contrib/eslint-config-webpack": "npm:~3.0.0" + babel-jest: "npm:^29.7.0" + cross-env: "npm:^7.0.3" + eslint: "npm:^8.57.1" + eslint-config-webpack: "npm:^1.0.0" + eslint-plugin-import: "npm:^2.2.0" + jest: "npm:^29.7.0" + lint-staged: "npm:^16.0.0" + loader-utils: "npm:^2.0.4" + pre-commit: "npm:^1.0.0" + schema-utils: "npm:^4.3.2" + standard-version: "npm:^9.5.0" + webpack: "npm:^5.99.8" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.0.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + languageName: unknown + linkType: soft + "@humanwhocodes/config-array@npm:^0.13.0": version: 0.13.0 resolution: "@humanwhocodes/config-array@npm:0.13.0" @@ -8269,37 +8300,6 @@ __metadata: languageName: node linkType: hard -"worklet-loader@workspace:.": - version: 0.0.0-use.local - resolution: "worklet-loader@workspace:." - dependencies: - "@babel/cli": "npm:^7.27.2" - "@babel/core": "npm:^7.27.1" - "@babel/preset-env": "npm:^7.27.2" - "@webpack-contrib/eslint-config-webpack": "npm:~3.0.0" - babel-jest: "npm:^29.7.0" - cross-env: "npm:^7.0.3" - eslint: "npm:^8.57.1" - eslint-config-webpack: "npm:^1.0.0" - eslint-plugin-import: "npm:^2.2.0" - jest: "npm:^29.7.0" - lint-staged: "npm:^16.0.0" - loader-utils: "npm:^2.0.4" - pre-commit: "npm:^1.0.0" - schema-utils: "npm:^4.3.2" - standard-version: "npm:^9.5.0" - webpack: "npm:^5.99.8" - peerDependencies: - "@rspack/core": 0.x || 1.x - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - languageName: unknown - linkType: soft - "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" From 74b19e5f3fb7ea72528b80bad4180364b169b358 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:08:29 -0400 Subject: [PATCH 09/19] chore: no more publish --- .github/workflows/ci.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94a32c2..9f1105d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,26 +69,26 @@ jobs: - name: Run linting run: yarn run lint - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Restore cache - uses: actions/cache@v4 - with: - path: node_modules - key: dependency-cache-${{ hashFiles('yarn.lock') }} - - name: Install dependencies - run: corepack enable && corepack install && yarn install --immutable - - name: Validate Commit Messages - run: yarn run release:validate - - name: Publish to NPM - run: printf "noop running conventional-github-releaser" + # publish: + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v2 + # - name: Set up Node.js + # uses: actions/setup-node@v4 + # with: + # node-version-file: .nvmrc + # - name: Restore cache + # uses: actions/cache@v4 + # with: + # path: node_modules + # key: dependency-cache-${{ hashFiles('yarn.lock') }} + # - name: Install dependencies + # run: corepack enable && corepack install && yarn install --immutable + # - name: Validate Commit Messages + # run: yarn run release:validate + # - name: Publish to NPM + # run: printf "noop running conventional-github-releaser" validate-publish: needs: [dependency_cache, test, analysis] From 2b3008862f0607e6436b894d7cce53fef9af73a5 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:18:01 -0400 Subject: [PATCH 10/19] chore: update CI configuration and remove unused jest configuration --- .github/workflows/ci.yml | 4 ++-- .jestrc | 3 --- jest.config.js | 5 +++++ package.json | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 .jestrc create mode 100644 jest.config.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f1105d..f79fd99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: run: corepack enable && corepack install && yarn install --immutable - name: Run unit tests run: yarn run ci:coverage - - name: Submit coverage data to codecov - run: bash <(curl -s https://codecov.io/bash) + # - name: Submit coverage data to codecov + # run: bash <(curl -s https://codecov.io/bash) analysis: runs-on: ubuntu-latest diff --git a/.jestrc b/.jestrc deleted file mode 100644 index 5f22ee6..0000000 --- a/.jestrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "testEnvironment": "node" -} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..c381f85 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,5 @@ +const config = { + testEnvironment: "node", +}; + +module.exports = config diff --git a/package.json b/package.json index 8ebfada..c19edd6 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "test:watch": "jest --watch", "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", "ci:lint": "yarn run lint", - "ci:test": "yarn run test -- --runInBand", - "ci:coverage": "yarn run test:coverage -- --runInBand", + "ci:test": "yarn run test --runInBand", + "ci:coverage": "yarn run test:coverage --runInBand", "defaults": "webpack-defaults", "webpack-defaults": "webpack-defaults" }, From 7bbb384a7445aaa40204e1309db2a00c14b4a0d3 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:19:35 -0400 Subject: [PATCH 11/19] Update ci.yml --- .github/workflows/ci.yml | 66 ++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f79fd99..da18ffe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,28 +4,6 @@ on: push: {} jobs: - dependency_cache: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Restore cache - uses: actions/cache@v4 - with: - path: node_modules - key: dependency-cache-${{ hashFiles('yarn.lock') }} - - name: Install dependencies - run: corepack enable && corepack install && yarn install --immutable - - name: Save cache - uses: actions/cache@v4 - with: - path: node_modules - key: dependency-cache-${{ hashFiles('yarn.lock') }} - test: runs-on: ubuntu-latest strategy: @@ -89,25 +67,25 @@ jobs: # run: yarn run release:validate # - name: Publish to NPM # run: printf "noop running conventional-github-releaser" - - validate-publish: - needs: [dependency_cache, test, analysis] - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Restore cache - uses: actions/cache@v4 - with: - path: node_modules - key: dependency-cache-${{ hashFiles('yarn.lock') }} - - name: Install dependencies - run: corepack enable && corepack install && yarn install --immutable - - name: Validate Commit Messages - run: yarn run release:validate - - name: Publish to NPM - run: printf "noop running conventional-github-releaser" + # + # validate-publish: + # needs: [dependency_cache, test, analysis] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v2 + # - name: Set up Node.js + # uses: actions/setup-node@v4 + # with: + # node-version-file: .nvmrc + # - name: Restore cache + # uses: actions/cache@v4 + # with: + # path: node_modules + # key: dependency-cache-${{ hashFiles('yarn.lock') }} + # - name: Install dependencies + # run: corepack enable && corepack install && yarn install --immutable + # - name: Validate Commit Messages + # run: yarn run release:validate + # - name: Publish to NPM + # run: printf "noop running conventional-github-releaser" From cde983ff271e35ffadf7051fe8530f5190bc6b11 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:21:03 -0400 Subject: [PATCH 12/19] Create CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..2df7184 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @gathertown/eng-prod From 8a2856c8627d56b38572e7b02201f840d1f583e1 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:27:13 -0400 Subject: [PATCH 13/19] chore: update .gitignore and .yarnrc.yml for improved caching and plugin support; fix start script in package.json --- .gitignore | 1 + .yarnrc.yml | 17 +++++++++++++++++ package.json | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e511a91..af5ac89 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ Thumbs.db # Yarn .pnp.* .yarn/install-state.gz +.yarn/plugins diff --git a/.yarnrc.yml b/.yarnrc.yml index 00c2ce1..21c3d40 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,5 +1,22 @@ defaultSemverRangePrefix: "~" enableConstraintsChecks: true +enableGlobalCache: true enableTelemetry: false nmMode: hardlinks-local nodeLinker: node-modules + +supportedArchitectures: + os: + - current + - darwin + - linux + - win32 + cpu: + - current + - x64 + - arm64 + + +plugins: + - path: .yarn/plugins/@yarnpkg/plugin-engines.cjs + spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js" diff --git a/package.json b/package.json index c19edd6..280f6df 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dist" ], "scripts": { - "start": "yarn run build -- -w", + "start": "yarn run build -w", "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", "clean": "rm -rf dist", "lint": "eslint --cache src test", From 29d02c25f61e0b8951357e7bbd230cc4e8754363 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:27:24 -0400 Subject: [PATCH 14/19] chore: remove unnecessary blank line in .yarnrc.yml --- .yarnrc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index 21c3d40..3c67397 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -16,7 +16,6 @@ supportedArchitectures: - x64 - arm64 - plugins: - path: .yarn/plugins/@yarnpkg/plugin-engines.cjs spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js" From 820688f48dd6d6f6ccc1aeca75b141d7a06d4437 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:30:41 -0400 Subject: [PATCH 15/19] chore: update CI node version matrix and .nvmrc; adjust package.json engines --- .github/workflows/ci.yml | 2 +- .nvmrc | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da18ffe..fc23490 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18, 20, 22] + node-version: [18, 20, 22, 24] steps: - name: Checkout code uses: actions/checkout@v2 diff --git a/.nvmrc b/.nvmrc index 5bd6811..ba33190 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.19.0 +20.19.2 diff --git a/package.json b/package.json index 280f6df..2f4d4d0 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ } }, "engines": { - "node": ">= 20.19.0" + "node": ">=18.20.8,>= 20.19.2,>=22.15.1,>=24.0.2" }, "pre-commit": "lint-staged", "lint-staged": { From 00aec1d20fb6fdf76b67692c023333695a888a94 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:32:30 -0400 Subject: [PATCH 16/19] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f4d4d0..86fc188 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ } }, "engines": { - "node": ">=18.20.8,>= 20.19.2,>=22.15.1,>=24.0.2" + "node": ">=18.20.8 >= 20.19.2 >=22.15.1 >=24.0.2" }, "pre-commit": "lint-staged", "lint-staged": { From 0b4f1fccb98a0f04ea02dded7c7dc13bf3837af9 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:33:07 -0400 Subject: [PATCH 17/19] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc23490..42c2be0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: node-version: [18, 20, 22, 24] steps: From 2a026e91f99c5eaebee97154ca893268a26fbaf8 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Thu, 15 May 2025 16:33:17 -0400 Subject: [PATCH 18/19] Discard changes to src/worklets/InlineWorklet.js --- src/worklets/InlineWorklet.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/worklets/InlineWorklet.js b/src/worklets/InlineWorklet.js index c90a1c0..2c216a8 100644 --- a/src/worklets/InlineWorklet.js +++ b/src/worklets/InlineWorklet.js @@ -1,3 +1,5 @@ +// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string + var URL = window.URL || window.webkitURL; module.exports = function (content) { @@ -5,6 +7,7 @@ module.exports = function (content) { var blob; try { + // BlobBuilder = Deprecated, but widely implemented var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || @@ -16,6 +19,7 @@ module.exports = function (content) { blob = blob.getBlob('application/javascript; charset=utf-8'); } catch (e) { + // The proposed API blob = new Blob([content], { type: 'application/javascript; charset=utf-8' }); } From a6100ee2c96230d5dbaa8968636027e796c2b382 Mon Sep 17 00:00:00 2001 From: Nathan Heaps Date: Thu, 15 May 2025 16:35:00 -0400 Subject: [PATCH 19/19] fix: correct node version range in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86fc188..250c654 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ } }, "engines": { - "node": ">=18.20.8 >= 20.19.2 >=22.15.1 >=24.0.2" + "node": ">=18.20.8 <25" }, "pre-commit": "lint-staged", "lint-staged": {