Skip to content

Commit

Permalink
Merge pull request #279 from aminya/vite [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Sep 4, 2024
2 parents 4e90bbc + 8302e55 commit ab36eab
Show file tree
Hide file tree
Showing 40 changed files with 3,586 additions and 314 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

env:
NODE_OPTIONS: --enable-source-maps

jobs:
Build:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -200,6 +203,14 @@ jobs:
env:
RUNNER_OS_NAME: ${{ matrix.os }}

- name: Modern Integration Tests
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
run: |
node ./dist/modern/setup-cpp.mjs --help
node ./dist/modern/setup-cpp.mjs --gcc true --cmake true
env:
RUNNER_OS_NAME: ${{ matrix.os }}

- name: Setup Node 12
uses: actions/setup-node@v4
with:
Expand All @@ -214,7 +225,7 @@ jobs:
node-version: 16
- name: Smoke Test Node 16
run: |
node ./dist/modern/setup-cpp.js --help
node ./dist/modern/setup-cpp.mjs --help
Docker:
name: Docker-${{ matrix.container.image }}
Expand Down
2 changes: 0 additions & 2 deletions .terserrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions .terserrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { buildTerserOptions } from "terser-config-atomic/dist/builder.js"
export default buildTerserOptions(process.env.NODE_ENV, undefined, true)
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ inputs:

runs:
using: "node20"
main: "dist/modern/setup-cpp.js"
main: "dist/modern/setup-cpp.mjs"

branding:
icon: "award"
Expand Down
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ words:
- libdw
- libstdc
- libtinfo
- liuli
- memoizee
- msbuild
- msvc
Expand Down
3 changes: 3 additions & 0 deletions dist/legacy/actions_python.0b2a8a9a.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/legacy/actions_python.0b2a8a9a.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/legacy/actions_python.895b8a50.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/legacy/actions_python.895b8a50.js.map

This file was deleted.

28 changes: 14 additions & 14 deletions dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/modern/actions_python.16ae5537.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/modern/actions_python.16ae5537.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions dist/modern/assets/actions_python-mhNRejTS.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/modern/assets/actions_python-mhNRejTS.mjs.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/modern/assets/hdi-CLiriP2M.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/modern/assets/hdi-CLiriP2M.mjs.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/modern/assets/proxy-agent-CtreyBpw.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/modern/assets/proxy-agent-CtreyBpw.mjs.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/modern/hdi.c1b21e1a.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/modern/hdi.c1b21e1a.js.map

This file was deleted.

31 changes: 0 additions & 31 deletions dist/modern/proxy-agent.74b39078.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/modern/proxy-agent.74b39078.js.map

This file was deleted.

45 changes: 0 additions & 45 deletions dist/modern/setup-cpp.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/modern/setup-cpp.js.map

This file was deleted.

3 changes: 3 additions & 0 deletions dist/modern/setup-cpp.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/modern/setup-cpp.mjs.map

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"license": "Apache-2.0",
"author": "Amin Yahyaabadi",
"main": "dist/legacy/setup-cpp.js",
"modern": "./dist/modern/setup-cpp.js",
"source": "./src/main.ts",
"modern": "./dist/modern/setup-cpp.mjs",
"source": "./src/setup-cpp.ts",
"bin": {
"setup-cpp": "dist/legacy/setup-cpp.js"
},
Expand All @@ -26,12 +26,13 @@
"tsconfig.json"
],
"scripts": {
"build": "turbo build && run-p lint.root.tsc build.parcel copy.matchers && run-s build.babel",
"build": "turbo build && run-p lint.root.tsc build.parcel build.vite && run-p build.babel copy.json",
"build.parcel": "cross-env NODE_ENV=production parcel build",
"build.babel": "babel ./dist --out-dir dist --plugins @upleveled/babel-plugin-remove-node-prefix --plugins @babel/plugin-transform-private-methods --compact --no-babelrc --source-maps true",
"build.vite": "cross-env NODE_ENV=production vite build",
"build.babel": "babel ./dist/legacy --out-dir ./dist/legacy --plugins @upleveled/babel-plugin-remove-node-prefix --plugins @babel/plugin-transform-private-methods --compact --no-babelrc --source-maps true",
"bump": "ncu -u -x numerous,execa,prettier,@types/node,eslint,@types/eslint && pnpm update && pnpx typesync && pnpm run clean",
"clean": "shx rm -rf ./dist ./packages/*/dist ./exe ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/modern ./dist/modern ",
"copy.matchers": "shx cp ./src/*/*.json ./dist/legacy/ && shx cp ./dist/legacy/*.json ./dist/modern",
"copy.json": "shx cp ./src/*/*.json ./dist/legacy/ && shx cp ./dist/legacy/*.json ./dist/modern",
"dev.parcel": "cross-env NODE_ENV=development parcel watch",
"dev.packages": "turbo dev",
"dev": "run-p dev.packages dev.parcel",
Expand Down Expand Up @@ -63,6 +64,7 @@
"@babel/plugin-transform-private-methods": "^7.25.4",
"@biomejs/biome": "^1.8.3",
"@iarna/toml": "^2.2.5",
"@liuli-util/vite-plugin-node": "^0.9.0",
"@octokit/core": "^6.1.2",
"@octokit/openapi-types": "^22.2.0",
"@octokit/plugin-paginate-rest": "^11.3.3",
Expand Down Expand Up @@ -117,13 +119,15 @@
"prettier-config-atomic": "^4.0.0",
"readme-md-generator": "^1.0.0",
"retry-as-promised": "^7.0.4",
"rollup": "^4.21.2",
"safe-stable-stringify": "^2.5.0",
"semver": "7.6.3",
"setup-apt": "workspace:*",
"setup-brew": "workspace:*",
"setup-python": "github:aminya/setup-python#a783db655c6e40317e2c0c96f9d162d9c9f4a751",
"shx": "0.3.4",
"simple-update-notifier": "^2.0.0",
"terser": "^5.31.6",
"terser-config-atomic": "^1.0.0",
"time-delta": "github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e",
"ts-node": "^10.9.2",
Expand All @@ -133,6 +137,8 @@
"ubuntu-version": "^2.0.0",
"untildify-user": "workspace:*",
"util.types": "^0.0.2",
"vite": "^5.4.3",
"vite-plugin-node": "^3.1.0",
"web-streams-polyfill": "^4.0.0",
"which": "^4.0.0"
},
Expand Down Expand Up @@ -219,15 +225,6 @@
"includeNodeModules": true,
"optimize": true,
"outputFormat": "commonjs"
},
"modern": {
"context": "node",
"engines": {
"node": ">=20.x"
},
"includeNodeModules": true,
"optimize": true,
"outputFormat": "commonjs"
}
},
"pnpm": {
Expand Down
Loading

0 comments on commit ab36eab

Please sign in to comment.