fix: fix ci-info not running in an ESM context

This commit is contained in:
Amin Yahyaabadi 2024-10-06 20:48:03 -07:00
parent d485b24c12
commit 24f9b03dc4
28 changed files with 56 additions and 30 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "ci-log",
"version": "1.0.1",
"version": "1.0.2",
"description": "Colorful logging and print for any environment including GitHub Actions",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/ci-log",

View File

@ -1,5 +1,6 @@
import * as core from "@actions/core"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
export function error(err: string | Error) {
return GITHUB_ACTIONS ? core.error(err) : console.log(`\x1b[31m${err}\x1b[0m`)

View File

@ -1,6 +1,6 @@
{
"name": "envosman",
"version": "1.0.2",
"version": "1.0.3",
"description": "Manage environment variables, PATH, and rc files",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/envosman",

View File

@ -1,6 +1,7 @@
import { promises } from "fs"
import { exportVariable as ghExportVariable } from "@actions/core"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { error, info } from "ci-log"
import { execPowershell } from "exec-powershell"
import { defaultRcPath, sourceRCInRc } from "./rc-file.js"

View File

@ -1,7 +1,8 @@
import { promises } from "fs"
import { delimiter } from "path"
import { addPath as ghAddPath } from "@actions/core"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { error, info } from "ci-log"
import { execPowershell } from "exec-powershell"
import { defaultRcPath, sourceRCInRc } from "./rc-file.js"

View File

@ -1,6 +1,6 @@
{
"name": "setup-apt",
"version": "2.0.0",
"version": "2.0.2",
"description": "Setup apt packages and repositories in Debian/Ubuntu-based distributions",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-apt",
@ -9,6 +9,11 @@
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"files": [
"dist",
"src",
"tsconfig.json"
],
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -1,6 +1,7 @@
import { promises } from "fs"
import { execRoot } from "admina"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { sourceRC } from "envosman"
import type { RcOptions } from "envosman/dist/rc-file.js"
const { appendFile } = promises

View File

@ -1,6 +1,6 @@
{
"name": "setup-brew",
"version": "1.0.1",
"version": "1.0.2",
"description": "Setup brew and brew packages",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-brew",
@ -9,6 +9,11 @@
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"files": [
"dist",
"src",
"tsconfig.json"
],
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",

View File

@ -1,4 +1,5 @@
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
import { getVersion } from "../../versions/versions.js"
import { setupCmake } from "../cmake.js"

View File

@ -1,6 +1,7 @@
import path from "path"
import { fileURLToPath } from "url"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { error, info, warning } from "ci-log"
import { addEnv } from "envosman"
import { execa } from "execa"

View File

@ -1,6 +1,7 @@
import path, { join } from "path"
import { fileURLToPath } from "url"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info } from "ci-log"
import { addEnv, addPath } from "envosman"
import { pathExists } from "path-exists"

View File

@ -2,7 +2,8 @@ import { tmpdir } from "os"
import path, { delimiter, join } from "path"
import { fileURLToPath } from "url"
import { execRootSync } from "admina"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info, warning } from "ci-log"
import { addEnv } from "envosman"
import memoize from "memoizee"

View File

@ -2,7 +2,8 @@ import path, { join } from "path"
import { fileURLToPath } from "url"
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { error, info, warning } from "ci-log"
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
import { pathExists } from "path-exists"

View File

@ -1,4 +1,5 @@
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
import { getVersion } from "../../versions/versions.js"
import { setupNinja } from "../ninja.js"

View File

@ -1,4 +1,5 @@
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
import { getVersion } from "../../versions/versions.js"
import { setupPowershell } from "../powershell.js"

View File

@ -1,4 +1,5 @@
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info } from "ci-log"
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"

View File

@ -1,7 +1,8 @@
import path, { join } from "path"
import { fileURLToPath } from "url"
import { debug } from "@actions/core"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info, warning } from "ci-log"
import { pathExists } from "path-exists"
import { findPyPyVersion } from "setup-python/src/find-pypy.js"

View File

@ -2,7 +2,8 @@ import assert from "assert"
import { homedir } from "os"
import { dirname, join, parse as pathParse } from "path"
import { getExecOutput } from "@actions/exec"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info, warning } from "ci-log"
import { addPath } from "envosman"
import { execa } from "execa"

View File

@ -1,4 +1,5 @@
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
import { getVersion } from "../../versions/versions.js"
import { setupTask } from "../task.js"

View File

@ -1,7 +1,8 @@
import { tmpdir } from "os"
import { basename, join } from "path"
import { cacheDir, downloadTool, find } from "@actions/tool-cache"
import { GITHUB_ACTIONS } from "ci-info"
import ciInfo from "ci-info"
const { GITHUB_ACTIONS } = ciInfo
import { info, warning } from "ci-log"
import { addPath } from "envosman"
import { chmod } from "fs/promises"