diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 25717033..b94571d0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -8,13 +8,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: persist-credentials: false - name: Install Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 24 cache: npm - run: npm ci - run: npm run build diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 00000000..d5e980ba --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,23 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*' + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: 24 + - run: npm ci + - run: npm run build + - run: npm test + - run: npm publish diff --git a/package-lock.json b/package-lock.json index de609b01..2c599f70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "scratch-storage", - "version": "0.0.0-development", + "name": "@turbowarp/scratch-storage", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "scratch-storage", - "version": "0.0.0-development", + "name": "@turbowarp/scratch-storage", + "version": "2.0.0", "license": "BSD-3-Clause", "dependencies": { "@babel/runtime": "7.21.0", diff --git a/package.json b/package.json index 980c0bfc..c1afa01c 100644 --- a/package.json +++ b/package.json @@ -1,63 +1,60 @@ { - "name": "scratch-storage", - "version": "0.0.0-development", - "description": "Load and store project and asset files for Scratch 3.0", - "license": "BSD-3-Clause", - "homepage": "https://github.com/PenguinMod-Port/scratch-storage#readme", - "repository": { - "type": "git", - "url": "https://github.com/PenguinMod-Port/scratch-storage.git" - }, - "main": "./dist/node/scratch-storage.js", - "browser": "./dist/web/scratch-storage.js", - "scripts": { - "prepublishOnly": "npm run build", - "build": "webpack --progress --colors --bail", - "coverage": "tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov", - "commitmsg": "commitlint -e $GIT_PARAMS", - "test": "npm run test:lint && jest \"test[\\\\/](unit|integration)\"", - "test:clearCache": "jest --clearCache", - "test:lint": "eslint .", - "test:integration": "jest \"test[\\\\/]integration\"", - "test:unit": "jest \"test[\\\\/]unit\"", - "version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"", - "watch": "webpack --progress --colors --watch", - "semantic-release": "semantic-release" - }, - "tap": { - "check-coverage": false - }, - "dependencies": { - "@babel/runtime": "7.21.0", - "@turbowarp/nanolog": "^0.2.0", - "arraybuffer-loader": "^1.0.3", - "base64-js": "1.3.0", - "cross-fetch": "3.1.5", - "js-md5": "0.7.3", - "pmp-protobuf": "^1.6.0", - "worker-loader": "^2.0.0" - }, - "devDependencies": { - "@babel/core": "7.14.8", - "@babel/plugin-transform-runtime": "7.21.0", - "@babel/polyfill": "7.12.1", - "@babel/preset-env": "7.14.8", - "@types/jest": "29.5.1", - "babel-eslint": "10.1.0", - "babel-loader": "8.0.6", - "eslint": "8.55.0", - "eslint-config-scratch": "9.0.3", - "eslint-plugin-jest": "27.2.1", - "eslint-plugin-react": "7.33.2", - "file-loader": "4.1.0", - "jest": "29.5.0", - "json": "^9.0.4", - "webpack": "4.47.0", - "webpack-cli": "3.1.2" - }, - "overrides": { - "webpack@4.47.0": { - "terser-webpack-plugin": "^4.2.3" - } + "name": "@turbowarp/scratch-storage", + "version": "2.0.0", + "description": "Load and store project and asset files for Scratch 3.0", + "license": "BSD-3-Clause", + "homepage": "https://github.com/TurboWarp/scratch-storage#readme", + "repository": { + "type": "git", + "url": "https://github.com/TurboWarp/scratch-storage.git" + }, + "main": "./dist/node/scratch-storage.js", + "browser": "./dist/web/scratch-storage.js", + "scripts": { + "prepublishOnly": "npm run build", + "build": "webpack --progress --colors --bail", + "coverage": "tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov", + "test": "npm run test:lint && jest \"test[\\\\/](unit|integration)\"", + "test:clearCache": "jest --clearCache", + "test:lint": "eslint .", + "test:integration": "jest \"test[\\\\/]integration\"", + "test:unit": "jest \"test[\\\\/]unit\"", + "watch": "webpack --progress --colors --watch" + }, + "tap": { + "check-coverage": false + }, + "dependencies": { + "@babel/runtime": "7.21.0", + "@turbowarp/nanolog": "^0.2.0", + "arraybuffer-loader": "^1.0.3", + "base64-js": "1.3.0", + "cross-fetch": "3.1.5", + "js-md5": "0.7.3", + "pmp-protobuf": "^1.6.0", + "worker-loader": "^2.0.0" + }, + "devDependencies": { + "@babel/core": "7.14.8", + "@babel/plugin-transform-runtime": "7.21.0", + "@babel/polyfill": "7.12.1", + "@babel/preset-env": "7.14.8", + "@types/jest": "29.5.1", + "babel-eslint": "10.1.0", + "babel-loader": "8.0.6", + "eslint": "8.55.0", + "eslint-config-scratch": "9.0.3", + "eslint-plugin-jest": "27.2.1", + "eslint-plugin-react": "7.33.2", + "file-loader": "4.1.0", + "jest": "29.5.0", + "json": "^9.0.4", + "webpack": "4.47.0", + "webpack-cli": "3.1.2" + }, + "overrides": { + "webpack@4.47.0": { + "terser-webpack-plugin": "^4.2.3" } + } }