Skip to content

Commit 24f9b03

Browse files
committed
fix: fix ci-info not running in an ESM context
1 parent d485b24 commit 24f9b03

28 files changed

+56
-30
lines changed

dist/legacy/assets/actions_python-B7InDb2U.js dist/legacy/assets/actions_python-juFJ8Ha1.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/assets/actions_python-B7InDb2U.js.map dist/legacy/assets/actions_python-juFJ8Ha1.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/assets/actions_python-Dr1ce8ZD.mjs dist/modern/assets/actions_python-DZNSVoc3.mjs

+2-2
Large diffs are not rendered by default.

dist/modern/assets/actions_python-Dr1ce8ZD.mjs.map dist/modern/assets/actions_python-DZNSVoc3.mjs.map

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.map

+1-1
Large diffs are not rendered by default.

packages/ci-log/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ci-log",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Colorful logging and print for any environment including GitHub Actions",
55
"repository": "https://github.com/aminya/setup-cpp",
66
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/ci-log",

packages/ci-log/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from "@actions/core"
2-
import { GITHUB_ACTIONS } from "ci-info"
2+
import ciInfo from "ci-info"
3+
const { GITHUB_ACTIONS } = ciInfo
34

45
export function error(err: string | Error) {
56
return GITHUB_ACTIONS ? core.error(err) : console.log(`\x1b[31m${err}\x1b[0m`)

packages/envosman/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "envosman",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Manage environment variables, PATH, and rc files",
55
"repository": "https://github.com/aminya/setup-cpp",
66
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/envosman",

packages/envosman/src/add-env.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { promises } from "fs"
22
import { exportVariable as ghExportVariable } from "@actions/core"
3-
import { GITHUB_ACTIONS } from "ci-info"
3+
import ciInfo from "ci-info"
4+
const { GITHUB_ACTIONS } = ciInfo
45
import { error, info } from "ci-log"
56
import { execPowershell } from "exec-powershell"
67
import { defaultRcPath, sourceRCInRc } from "./rc-file.js"

packages/envosman/src/add-path.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { promises } from "fs"
22
import { delimiter } from "path"
33
import { addPath as ghAddPath } from "@actions/core"
4-
import { GITHUB_ACTIONS } from "ci-info"
4+
import ciInfo from "ci-info"
5+
const { GITHUB_ACTIONS } = ciInfo
56
import { error, info } from "ci-log"
67
import { execPowershell } from "exec-powershell"
78
import { defaultRcPath, sourceRCInRc } from "./rc-file.js"

packages/setup-apt/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setup-apt",
3-
"version": "2.0.0",
3+
"version": "2.0.2",
44
"description": "Setup apt packages and repositories in Debian/Ubuntu-based distributions",
55
"repository": "https://github.com/aminya/setup-cpp",
66
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-apt",
@@ -9,6 +9,11 @@
99
"main": "./dist/index.js",
1010
"source": "./src/index.ts",
1111
"type": "module",
12+
"files": [
13+
"dist",
14+
"src",
15+
"tsconfig.json"
16+
],
1217
"scripts": {
1318
"build": "tsc --pretty",
1419
"dev": "tsc --watch --pretty",

packages/setup-apt/src/alternatives.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { promises } from "fs"
22
import { execRoot } from "admina"
3-
import { GITHUB_ACTIONS } from "ci-info"
3+
import ciInfo from "ci-info"
4+
const { GITHUB_ACTIONS } = ciInfo
45
import { sourceRC } from "envosman"
56
import type { RcOptions } from "envosman/dist/rc-file.js"
67
const { appendFile } = promises

packages/setup-brew/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setup-brew",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Setup brew and brew packages",
55
"repository": "https://github.com/aminya/setup-cpp",
66
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-brew",
@@ -9,6 +9,11 @@
99
"main": "./dist/index.js",
1010
"source": "./src/index.ts",
1111
"type": "module",
12+
"files": [
13+
"dist",
14+
"src",
15+
"tsconfig.json"
16+
],
1217
"scripts": {
1318
"build": "tsc --pretty",
1419
"dev": "tsc --watch --pretty",

src/cmake/__tests__/cmake.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GITHUB_ACTIONS } from "ci-info"
1+
import ciInfo from "ci-info"
2+
const { GITHUB_ACTIONS } = ciInfo
23
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
34
import { getVersion } from "../../versions/versions.js"
45
import { setupCmake } from "../cmake.js"

src/gcc/gcc.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import path from "path"
22
import { fileURLToPath } from "url"
3-
import { GITHUB_ACTIONS } from "ci-info"
3+
import ciInfo from "ci-info"
4+
const { GITHUB_ACTIONS } = ciInfo
45
import { error, info, warning } from "ci-log"
56
import { addEnv } from "envosman"
67
import { execa } from "execa"

src/gcc/mingw.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import path, { join } from "path"
22
import { fileURLToPath } from "url"
3-
import { GITHUB_ACTIONS } from "ci-info"
3+
import ciInfo from "ci-info"
4+
const { GITHUB_ACTIONS } = ciInfo
45
import { info } from "ci-log"
56
import { addEnv, addPath } from "envosman"
67
import { pathExists } from "path-exists"

src/llvm/llvm.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { tmpdir } from "os"
22
import path, { delimiter, join } from "path"
33
import { fileURLToPath } from "url"
44
import { execRootSync } from "admina"
5-
import { GITHUB_ACTIONS } from "ci-info"
5+
import ciInfo from "ci-info"
6+
const { GITHUB_ACTIONS } = ciInfo
67
import { info, warning } from "ci-log"
78
import { addEnv } from "envosman"
89
import memoize from "memoizee"

src/msvc/msvc.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import path, { join } from "path"
22
import { fileURLToPath } from "url"
33
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
44
// @ts-ignore
5-
import { GITHUB_ACTIONS } from "ci-info"
5+
import ciInfo from "ci-info"
6+
const { GITHUB_ACTIONS } = ciInfo
67
import { error, info, warning } from "ci-log"
78
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
89
import { pathExists } from "path-exists"

src/ninja/__tests__/ninja.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GITHUB_ACTIONS } from "ci-info"
1+
import ciInfo from "ci-info"
2+
const { GITHUB_ACTIONS } = ciInfo
23
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
34
import { getVersion } from "../../versions/versions.js"
45
import { setupNinja } from "../ninja.js"

src/powershell/__tests__/powershell.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GITHUB_ACTIONS } from "ci-info"
1+
import ciInfo from "ci-info"
2+
const { GITHUB_ACTIONS } = ciInfo
23
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
34
import { getVersion } from "../../versions/versions.js"
45
import { setupPowershell } from "../powershell.js"

src/python/__tests__/python.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GITHUB_ACTIONS } from "ci-info"
1+
import ciInfo from "ci-info"
2+
const { GITHUB_ACTIONS } = ciInfo
23
import { info } from "ci-log"
34
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
45
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"

src/python/actions_python.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import path, { join } from "path"
22
import { fileURLToPath } from "url"
33
import { debug } from "@actions/core"
4-
import { GITHUB_ACTIONS } from "ci-info"
4+
import ciInfo from "ci-info"
5+
const { GITHUB_ACTIONS } = ciInfo
56
import { info, warning } from "ci-log"
67
import { pathExists } from "path-exists"
78
import { findPyPyVersion } from "setup-python/src/find-pypy.js"

src/python/python.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import assert from "assert"
22
import { homedir } from "os"
33
import { dirname, join, parse as pathParse } from "path"
44
import { getExecOutput } from "@actions/exec"
5-
import { GITHUB_ACTIONS } from "ci-info"
5+
import ciInfo from "ci-info"
6+
const { GITHUB_ACTIONS } = ciInfo
67
import { info, warning } from "ci-log"
78
import { addPath } from "envosman"
89
import { execa } from "execa"

src/task/__tests__/task.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GITHUB_ACTIONS } from "ci-info"
1+
import ciInfo from "ci-info"
2+
const { GITHUB_ACTIONS } = ciInfo
23
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
34
import { getVersion } from "../../versions/versions.js"
45
import { setupTask } from "../task.js"

src/utils/setup/setupBin.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { tmpdir } from "os"
22
import { basename, join } from "path"
33
import { cacheDir, downloadTool, find } from "@actions/tool-cache"
4-
import { GITHUB_ACTIONS } from "ci-info"
4+
import ciInfo from "ci-info"
5+
const { GITHUB_ACTIONS } = ciInfo
56
import { info, warning } from "ci-log"
67
import { addPath } from "envosman"
78
import { chmod } from "fs/promises"

0 commit comments

Comments
 (0)