Skip to content

Commit

Permalink
Merge pull request #99 from aminya/esm
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Apr 23, 2023
2 parents 6fe2667 + 00c09d2 commit 8c72d55
Show file tree
Hide file tree
Showing 41 changed files with 554 additions and 240 deletions.
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ words:
- tsbuildinfo
- ucrt
- untildify
- upleveled
- vbatts
- vcpkg
- vcvarsall
Expand Down
4 changes: 2 additions & 2 deletions dev/scripts/pack-exe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import { node } from "execa"
import { execaNode } from "execa"

function getPlatformName() {
switch (process.platform) {
Expand Down Expand Up @@ -27,7 +27,7 @@ function main() {

return Promise.all(
exes.map((exe) =>
node("./node_modules/caxa/build/index.mjs", [
execaNode("./node_modules/caxa/build/index.mjs", [
"--input",
"./dist/node16",
"--output",
Expand Down
2 changes: 2 additions & 0 deletions dist/node12/actions_python.5b1184cd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/node12/actions_python.5b1184cd.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/node12/actions_python.67b034ac.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/node12/actions_python.67b034ac.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/node12/setup-cpp.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/node16/actions_python.06ec7b4d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/node16/actions_python.06ec7b4d.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/node16/actions_python.9a1d11b3.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/node16/actions_python.9a1d11b3.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/node16/setup-cpp.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

31 changes: 10 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"build.docker.arch": "pnpm build && docker build -f ./dev/docker/arch_node.dockerfile -t setup-cpp:arch .",
"build.docker.fedora": "pnpm build && docker build -f ./dev/docker/fedora_node.dockerfile -t setup-cpp:fedora .",
"build.docker.ubuntu": "pnpm build && docker build -f ./dev/docker/ubuntu_node.dockerfile -t setup-cpp:ubuntu .",
"build.parcel": "cross-env NODE_ENV=production parcel build",
"bump": "ncu -u -x execa,numerous,path-exists && pnpm update",
"build.parcel": "cross-env NODE_ENV=production parcel build && babel ./dist --out-dir dist --plugins @upleveled/babel-plugin-remove-node-prefix --compact --no-babelrc --source-maps true",
"bump": "ncu -u -x numerous && pnpm update",
"clean": "shx rm -rf .parcel-cache dist exe",
"copy.matchers": "shx cp ./src/gcc/gcc_matcher.json ./dist/node12/ && shx cp ./src/msvc/msvc_matcher.json ./dist/node12/ && shx cp ./src/python/python_matcher.json ./dist/node12/ && shx cp ./src/llvm/llvm_matcher.json ./dist/node12/ && shx cp ./dist/node12/*.json ./dist/node16/",
"dev": "cross-env NODE_ENV=development parcel watch",
Expand Down Expand Up @@ -64,15 +64,17 @@
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@babel/cli": "^7.21.0",
"@types/cross-spawn": "^6.0.2",
"@types/eslint": "^8.37.0",
"@types/jest": "^29.5.1",
"@types/mri": "^1.1.1",
"@types/node": "^18.15.13",
"@types/node": "^18.16.0",
"@types/npmcli__ci-detect": "^2.0.0",
"@types/prettier": "2.7.2",
"@types/semver": "^7.3.13",
"@types/which": "^3.0.0",
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix#95fcbd92405b99a6eece48c493548996f12e6519",
"admina": "^0.1.3",
"caxa": "^3.0.1",
"ci-info": "^3.8.0",
Expand All @@ -86,7 +88,8 @@
"eslint": "^8.39.0",
"eslint-config-atomic": "^1.18.3",
"exec-powershell": "workspace:*",
"execa": "^5.1.1",
"execa": "^7.1.1",
"fast-glob": "^3.2.12",
"gen-readme": "^1.6.0",
"is-url-online": "^1.5.0",
"jest": "^29.5.0",
Expand All @@ -96,14 +99,14 @@
"npm-run-all2": "^6.0.5",
"numerous": "1.0.3",
"parcel": "2.8.3",
"path-exists": "^4.0.0",
"path-exists": "^5.0.0",
"patha": "^0.4.1",
"prettier": "2.7.1",
"prettier": "2.8.8",
"prettier-config-atomic": "^3.1.0",
"quote-unquote": "^1.0.0",
"readme-md-generator": "^1.0.0",
"retry-as-promised": "^7.0.4",
"semver": "7.3.8",
"semver": "7.5.0",
"setup-python": "github:actions/setup-python#v4.6.0",
"shx": "0.3.4",
"terser-config-atomic": "^0.1.1",
Expand Down Expand Up @@ -144,20 +147,6 @@
"patha": "patha/dist/index.node.mjs"
},
"main.actions": "./dist/node16/setup-cpp.js",
"pnpm": {
"overrides": {
"semver": "7.3.8",
"eslint": "^8.28.0",
"prettier": "2.7.1",
"core-js": "*",
"babel-eslint": "npm:@babel/eslint-parser"
},
"peerDependencyRules": {
"allowedVersions": {
"eslint": "*"
}
}
},
"targets": {
"main": {
"context": "node",
Expand Down
2 changes: 1 addition & 1 deletion packages/exec-powershell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Execute a powershell command.

- command (`string`) - The powershell command to execute
- startupFlags (`string[]`) - The optional startup flags to be passed to powershell. Defaults to `["-NoProfile", "-NoLogo", "-NonInteractive"]`. This means that the Powershell profile is not sourced first.
- execOptions (`execa.SyncOptions`) - The options passed to `execa`. Defaults to `{ stdio: "inherit" }`
- execOptions (`execaSyncOptions`) - The options passed to `execa`. Defaults to `{ stdio: "inherit" }`

**returns:** execa.ExecaSyncReturnValue<string>

Expand Down
2 changes: 1 addition & 1 deletion packages/exec-powershell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "tsc"
},
"dependencies": {
"execa": "^5.1.1",
"execa": "^7.1.1",
"which": "^2.0.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/exec-powershell/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import execa from "execa"
import * as execa from "execa"
import which from "which"

/** The cached powershell path */
Expand All @@ -19,7 +19,7 @@ export function execPowershell(
startupFlags: string[] = ["-NoProfile", "-NoLogo", "-NonInteractive"],
execOptions: execa.Options = { stdio: "inherit" }
): execa.ExecaChildProcess<string> {
return execa(getPowerShell(), [...startupFlags, "-c", command], execOptions)
return execa.execa(getPowerShell(), [...startupFlags, "-c", command], execOptions)
}

/**
Expand All @@ -37,7 +37,7 @@ export function execPowershellSync(
startupFlags: string[] = ["-NoProfile", "-NoLogo", "-NonInteractive"],
execOptions: execa.SyncOptions = { stdio: "inherit" }
): execa.ExecaSyncReturnValue<string> {
return execa.sync(getPowerShell(), [...startupFlags, "-c", command], execOptions)
return execa.execaSync(getPowerShell(), [...startupFlags, "-c", command], execOptions)
}

/**
Expand Down
Loading

0 comments on commit 8c72d55

Please sign in to comment.