chore: upgrade all deps

chore: refactor package json scripts
chore: rename scripts used for ci with @ci prefix
This commit is contained in:
dpiercey 2024-03-05 09:29:50 -07:00 committed by Dylan Piercey
parent 1d4872e7f9
commit dc2520ae21
19 changed files with 1002 additions and 797 deletions

View File

@ -39,7 +39,7 @@ Prior to merging your PR, you will need to sign the [Open JS Foundation CLA](htt
Before submitting your PR, make sure that all new and previous tests pass and that [coverage](https://codecov.io/gh/marko-js/marko) has not decreased: Before submitting your PR, make sure that all new and previous tests pass and that [coverage](https://codecov.io/gh/marko-js/marko) has not decreased:
``` ```
npm run ci:test npm run @ci:test
# to view the coverage report # to view the coverage report
npm run report npm run report

View File

@ -23,16 +23,16 @@ jobs:
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Use node - name: Use node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Build - name: Build
run: npm run build run: npm run @ci:build
- name: Format Code - name: Format Code
run: npm run format run: npm run @ci:format
- name: Commit changes - name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
@ -47,21 +47,23 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: [16, 18, 20] node: [18, 20]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use node@${{ matrix.node }} - name: Use node@${{ matrix.node }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run tests - name: Run tests
run: npm run ci:test run: npm run @ci:test
- name: Report code coverage - name: Report code coverage
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [format, test] needs: [format, test]
@ -70,7 +72,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
@ -80,8 +82,8 @@ jobs:
id: changesets id: changesets
uses: changesets/action@v1 uses: changesets/action@v1
with: with:
version: npm run version version: npm run @ci:version
publish: npm run release publish: npm run @ci:release
commit: "[ci] release" commit: "[ci] release"
title: "[ci] release" title: "[ci] release"
env: env:

View File

@ -1 +1 @@
npm exec -- lint-staged && npm run build:types && npm run build:sizes && git add .sizes.json npm exec -- lint-staged && npm run build && npm run build:sizes && git add .sizes.json

4
.prettierrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"plugins": ["prettier-plugin-packagejson"]
}

View File

@ -8,7 +8,7 @@
"name": "*", "name": "*",
"total": { "total": {
"min": 12664, "min": 12664,
"gzip": 5394, "gzip": 5402,
"brotli": 4922 "brotli": 4922
} }
}, },
@ -16,53 +16,53 @@
"name": "counter", "name": "counter",
"user": { "user": {
"min": 351, "min": 351,
"gzip": 275, "gzip": 276,
"brotli": 238 "brotli": 234
}, },
"runtime": { "runtime": {
"min": 3821, "min": 3821,
"gzip": 1800, "gzip": 1808,
"brotli": 1614 "brotli": 1614
}, },
"total": { "total": {
"min": 4172, "min": 4172,
"gzip": 2075, "gzip": 2084,
"brotli": 1852 "brotli": 1848
} }
}, },
{ {
"name": "counter 💧", "name": "counter 💧",
"user": { "user": {
"min": 204, "min": 204,
"gzip": 182, "gzip": 179,
"brotli": 157 "brotli": 152
}, },
"runtime": { "runtime": {
"min": 2683, "min": 2683,
"gzip": 1370, "gzip": 1362,
"brotli": 1222 "brotli": 1222
}, },
"total": { "total": {
"min": 2887, "min": 2887,
"gzip": 1552, "gzip": 1541,
"brotli": 1379 "brotli": 1374
} }
}, },
{ {
"name": "comments", "name": "comments",
"user": { "user": {
"min": 1182, "min": 1182,
"gzip": 703, "gzip": 698,
"brotli": 637 "brotli": 637
}, },
"runtime": { "runtime": {
"min": 7363, "min": 7363,
"gzip": 3405, "gzip": 3396,
"brotli": 3091 "brotli": 3091
}, },
"total": { "total": {
"min": 8545, "min": 8545,
"gzip": 4108, "gzip": 4094,
"brotli": 3728 "brotli": 3728
} }
}, },
@ -70,17 +70,17 @@
"name": "comments 💧", "name": "comments 💧",
"user": { "user": {
"min": 949, "min": 949,
"gzip": 588, "gzip": 583,
"brotli": 544 "brotli": 544
}, },
"runtime": { "runtime": {
"min": 7887, "min": 7887,
"gzip": 3612, "gzip": 3605,
"brotli": 3284 "brotli": 3284
}, },
"total": { "total": {
"min": 8836, "min": 8836,
"gzip": 4200, "gzip": 4188,
"brotli": 3828 "brotli": 3828
} }
} }

1512
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,66 +5,65 @@
"./packages/*" "./packages/*"
], ],
"scripts": { "scripts": {
"build": "npm run build --ws && npm run build:types", "@ci:build": "npm run build",
"build:sizes": "npm run build --ws && node -r ~ts scripts/sizes.ts", "@ci:format": "eslint --format unix --fix . && prettier . --write --with-node-modules --log-level=warn",
"build:types": "tsc -b tsconfig.build.json", "@ci:release": "npm run build && node scripts/pkg-override && changeset publish && node scripts/pkg-override && npm ci",
"@ci:test": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" MARKO_DEBUG=1 c8 npm test",
"@ci:version": "changeset version && npm i --package-lock-only",
"build": "npm run build --ws && tsc -b tsconfig.build.json",
"build:sizes": "node -r ~ts scripts/sizes",
"change": "changeset add", "change": "changeset add",
"ci:test": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" MARKO_DEBUG=1 c8 npm test", "format": "eslint --format unix --fix .; prettier . --write --with-node-modules --log-level=warn",
"format": "npm run lint:eslint -- --fix && npm run lint:prettier -- --write", "lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn",
"lint": "npm run lint:eslint && npm run lint:prettier -- -l",
"lint:eslint": "eslint --format visualstudio .",
"lint:prettier": "prettier . --with-node-modules",
"prepare": "husky", "prepare": "husky",
"release": "npm run build && node scripts/pkg-override && changeset publish && node scripts/pkg-override && npm ci",
"report": "open ./coverage/lcov-report/index.html", "report": "open ./coverage/lcov-report/index.html",
"test": "mocha", "test": "mocha",
"test:update": "UPDATE_EXPECTATIONS=1 mocha --update", "test:update": "UPDATE_EXPECTATIONS=1 mocha --update"
"version": "changeset version && npm i --package-lock-only"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.23.9", "@babel/cli": "^7.23.9",
"@babel/core": "^7.23.9", "@babel/core": "^7.24.0",
"@babel/plugin-transform-modules-commonjs": "^7.23.3", "@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.23.9", "@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.23.9", "@babel/preset-env": "^7.24.0",
"@babel/preset-typescript": "^7.23.3", "@babel/preset-typescript": "^7.23.3",
"@babel/register": "^7.23.7", "@babel/register": "^7.23.7",
"@changesets/changelog-github": "^0.5.0", "@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1", "@changesets/cli": "^2.27.1",
"@ebay/browserslist-config": "^2.7.0", "@ebay/browserslist-config": "^2.8.0",
"@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-virtual": "^3.0.2", "@rollup/plugin-virtual": "^3.0.2",
"@types/babel__code-frame": "^7.0.6", "@types/babel__code-frame": "^7.0.6",
"@types/babel__traverse": "^7.20.5", "@types/babel__traverse": "^7.20.5",
"@types/jsdom": "^21.1.6", "@types/jsdom": "^21.1.6",
"@types/mocha": "^10.0.6", "@types/mocha": "^10.0.6",
"@types/node": "^20.11.16", "@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^6.20.0", "@typescript-eslint/parser": "^7.1.1",
"babel-plugin-minprops": "^2.0.1", "babel-plugin-minprops": "^2.0.1",
"bluebird": "^3.7.2", "bluebird": "^3.7.2",
"c8": "^9.1.0", "c8": "^9.1.0",
"chai": "^4.4.1", "chai": "^4.4.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"diffable-html": "^5.0.0", "diffable-html": "^5.0.0",
"esbuild": "^0.20.0", "esbuild": "^0.20.1",
"eslint": "^8.56.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",
"express": "^4.18.2", "express": "^4.18.3",
"husky": "^9.0.10", "husky": "^9.0.11",
"it-fails": "^1.0.7", "it-fails": "^1.0.7",
"jsdom": "^24.0.0", "jsdom": "^24.0.0",
"jsdom-context-require": "^5.2.2", "jsdom-context-require": "^5.2.3",
"kleur": "^4.1.5", "kleur": "^4.1.5",
"lint-staged": "^15.2.1", "lint-staged": "^15.2.2",
"mocha": "^10.2.0", "mocha": "^10.3.0",
"mocha-autotest": "^1.1.2", "mocha-autotest": "^1.1.2",
"mocha-snap": "^5.0.0", "mocha-snap": "^5.0.0",
"prettier": "^3.2.4", "prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.12",
"pretty-format": "^29.7.0", "pretty-format": "^29.7.0",
"prettier-plugin-packagejson": "^2.4.10", "rollup": "^4.12.0",
"rollup": "^4.9.6",
"table": "^6.8.1", "table": "^6.8.1",
"through": "^2.3.8", "through": "^2.3.8",
"through2": "^4.0.2", "through2": "^4.0.2",

View File

@ -28,12 +28,12 @@
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production" "build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.9", "@babel/runtime": "^7.24.0",
"jsesc": "^3.0.2", "jsesc": "^3.0.2",
"relative-import-path": "^1.0.0" "relative-import-path": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@marko/compiler": "^5.35.1" "@marko/compiler": "^5.35.4"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -18,7 +18,6 @@
}, },
"license": "MIT", "license": "MIT",
"author": "Dylan Piercey <dpiercey@ebay.com>", "author": "Dylan Piercey <dpiercey@ebay.com>",
"main": "src/index.js",
"exports": { "exports": {
".": { ".": {
"types": "./index.d.ts", "types": "./index.d.ts",
@ -39,6 +38,53 @@
"./package.json": "./package.json", "./package.json": "./package.json",
"./*": "./*" "./*": "./*"
}, },
"main": "src/index.js",
"types": "index.d.ts",
"files": [
"dist",
"config.js",
"config.d.ts",
"modules.js",
"index.d.ts",
"babel-types.d.ts",
"register.js",
"register.d.ts"
],
"scripts": {
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production",
"prepare": "node -r ~ts scripts/types"
},
"dependencies": {
"@babel/code-frame": "^7.23.5",
"@babel/core": "^7.24.0",
"@babel/generator": "^7.23.6",
"@babel/parser": "^7.24.0",
"@babel/plugin-syntax-typescript": "^7.23.3",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-typescript": "^7.23.6",
"@babel/runtime": "^7.24.0",
"@babel/traverse": "^7.24.0",
"@babel/types": "^7.24.0",
"@luxass/strip-json-comments": "^1.2.0",
"@marko/babel-utils": "^6.4.1",
"complain": "^1.6.0",
"he": "^1.2.0",
"htmljs-parser": "^5.5.2",
"jsesc": "^3.0.2",
"kleur": "^4.1.5",
"lasso-package-root": "^1.0.1",
"raptor-regexp": "^1.0.1",
"raptor-util": "^3.2.0",
"resolve-from": "^5.0.0",
"self-closing-tags": "^1.0.1",
"source-map-support": "^0.5.21"
},
"devDependencies": {
"@marko/translator-default": "^5.32.2"
},
"publishConfig": {
"access": "public"
},
"exports:override": { "exports:override": {
".": { ".": {
"types": "./index.d.ts", "types": "./index.d.ts",
@ -59,51 +105,5 @@
"./package.json": "./package.json", "./package.json": "./package.json",
"./*": "./*" "./*": "./*"
}, },
"types": "index.d.ts",
"files": [
"dist",
"config.js",
"config.d.ts",
"modules.js",
"index.d.ts",
"babel-types.d.ts",
"register.js",
"register.d.ts"
],
"scripts": {
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production",
"prepare": "node -r ~ts scripts/types"
},
"dependencies": {
"@babel/code-frame": "^7.23.5",
"@babel/core": "^7.23.9",
"@babel/generator": "^7.23.6",
"@babel/parser": "^7.23.9",
"@babel/plugin-syntax-typescript": "^7.23.3",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-typescript": "^7.23.6",
"@babel/runtime": "^7.23.9",
"@babel/traverse": "^7.23.9",
"@babel/types": "^7.23.9",
"@luxass/strip-json-comments": "^1.2.0",
"@marko/babel-utils": "^6.4.1",
"complain": "^1.6.0",
"he": "^1.2.0",
"htmljs-parser": "^5.5.2",
"jsesc": "^3.0.2",
"kleur": "^4.1.5",
"lasso-package-root": "^1.0.1",
"raptor-regexp": "^1.0.1",
"raptor-util": "^3.2.0",
"resolve-from": "^5.0.0",
"self-closing-tags": "^1.0.1",
"source-map-support": "^0.5.21"
},
"devDependencies": {
"@marko/translator-default": "^5.32.2"
},
"publishConfig": {
"access": "public"
},
"main:override": "dist/index.js" "main:override": "dist/index.js"
} }

View File

@ -64,8 +64,8 @@
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production" "build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production"
}, },
"dependencies": { "dependencies": {
"@marko/compiler": "^5.35.1", "@marko/compiler": "^5.35.4",
"@marko/translator-default": "^5.32.1", "@marko/translator-default": "^5.32.2",
"app-module-path": "^2.2.0", "app-module-path": "^2.2.0",
"argly": "^1.2.0", "argly": "^1.2.0",
"browser-refresh-client": "1.1.4", "browser-refresh-client": "1.1.4",

View File

@ -2,18 +2,6 @@
"name": "@marko/runtime-tags", "name": "@marko/runtime-tags",
"version": "0.1.2", "version": "0.1.2",
"description": "Optimized runtime for Marko templates.", "description": "Optimized runtime for Marko templates.",
"exports": {
"./*": "./src/*.ts",
"./debug/*": "./src/*.ts"
},
"exports:override": {
"./package.json": "./package.json",
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.mjs",
"default": "./dist/*.js"
}
},
"keywords": [ "keywords": [
"api", "api",
"marko", "marko",
@ -27,6 +15,10 @@
"url": "https://github.com/marko-js/marko" "url": "https://github.com/marko-js/marko"
}, },
"license": "MIT", "license": "MIT",
"exports": {
"./*": "./src/*.ts",
"./debug/*": "./src/*.ts"
},
"files": [ "files": [
"dist", "dist",
"!**/meta.*.json", "!**/meta.*.json",
@ -35,5 +27,13 @@
], ],
"scripts": { "scripts": {
"build": "node -r ~ts ./scripts/bundle.ts" "build": "node -r ~ts ./scripts/bundle.ts"
},
"exports:override": {
"./package.json": "./package.json",
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.mjs",
"default": "./dist/*.js"
}
} }
} }

View File

@ -4,6 +4,6 @@
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"rootDir": "src", "rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo", "tsBuildInfoFile": "dist/.tsbuildinfo"
}, }
} }

View File

@ -28,14 +28,14 @@
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production" "build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.9", "@babel/runtime": "^7.24.0",
"@marko/babel-utils": "^6.4.1", "@marko/babel-utils": "^6.4.1",
"magic-string": "^0.30.6", "magic-string": "^0.30.8",
"self-closing-tags": "^1.0.1" "self-closing-tags": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
"@marko/compiler": "^5.35.3", "@marko/compiler": "^5.35.4",
"marko": "^5.33.1" "marko": "^5.33.3"
}, },
"peerDependencies": { "peerDependencies": {
"@marko/compiler": "^5.16.1", "@marko/compiler": "^5.16.1",

View File

@ -1,5 +1,5 @@
{ {
"name": "marko-test", "name": "marko-test",
"description": "Template ID checksums include the package name and version. This file ensures that is consistent for snapshot tests", "version": "1.0.0",
"version": "1.0.0" "description": "Template ID checksums include the package name and version. This file ensures that is consistent for snapshot tests"
} }

View File

@ -18,7 +18,6 @@
"url": "https://github.com/marko-js/marko/tree/main/packages/translator-interop" "url": "https://github.com/marko-js/marko/tree/main/packages/translator-interop"
}, },
"license": "MIT", "license": "MIT",
"main:override": "dist/index.js",
"main": "src/index.ts", "main": "src/index.ts",
"files": [ "files": [
"dist", "dist",
@ -32,9 +31,10 @@
"@babel/code-frame": "^7.23.5", "@babel/code-frame": "^7.23.5",
"@marko/babel-utils": "^6.4.1", "@marko/babel-utils": "^6.4.1",
"@marko/translator-default": "^5.32.2", "@marko/translator-default": "^5.32.2",
"@marko/translator-tags": "^0.1.2" "@marko/translator-tags": "^0.1.3"
}, },
"peerDependencies": { "peerDependencies": {
"@marko/compiler": "^5.23.0" "@marko/compiler": "^5.23.0"
} },
"main:override": "dist/index.js"
} }

View File

@ -19,7 +19,6 @@
}, },
"license": "MIT", "license": "MIT",
"main": "src/index.ts", "main": "src/index.ts",
"main:override": "dist/index.js",
"files": [ "files": [
"dist", "dist",
"!**/__tests__", "!**/__tests__",
@ -34,5 +33,6 @@
}, },
"peerDependencies": { "peerDependencies": {
"@marko/compiler": "^5.23.0" "@marko/compiler": "^5.23.0"
} },
"main:override": "dist/index.js"
} }

View File

@ -1,5 +1,5 @@
{ {
"name": "test", "name": "test",
"description": "Template ID checksums include the package name and version. This file ensures that is consistent for snapshot tests", "version": "1.0.0",
"version": "1.0.0" "description": "Template ID checksums include the package name and version. This file ensures that is consistent for snapshot tests"
} }

View File

@ -4,11 +4,11 @@
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"rootDir": "src", "rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo", "tsBuildInfoFile": "dist/.tsbuildinfo"
}, },
"references": [ "references": [
{ {
"path": "../runtime-tags", "path": "../runtime-tags"
}, }
], ]
} }

View File

@ -25,6 +25,6 @@
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowUnreachableCode": false, "allowUnreachableCode": false,
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true
}, }
} }