Comparing version 3.2.2 to 4.0.0
@@ -34,7 +34,7 @@ 'use strict'; | ||
if (services[name].detect({env, cwd})) { | ||
return Object.assign({isCi: true}, services[name].configuration({env, cwd})); | ||
return {isCi: true, ...services[name].configuration({env, cwd})}; | ||
} | ||
} | ||
return Object.assign({isCi: Boolean(env.CI)}, git.configuration({env, cwd})); | ||
return {isCi: Boolean(env.CI), ...git.configuration({env, cwd})}; | ||
}; |
{ | ||
"name": "env-ci", | ||
"description": "Get environment variables exposed by CI services", | ||
"version": "3.2.2", | ||
"version": "4.0.0", | ||
"author": "Pierre Vanduynslager (https://github.com/pvdlg)", | ||
@@ -24,3 +24,3 @@ "bugs": { | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8.3" | ||
}, | ||
@@ -27,0 +27,0 @@ "files": [ |
@@ -30,16 +30,14 @@ // https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables | ||
return Object.assign( | ||
{ | ||
name: 'GitHub Actions', | ||
service: 'github', | ||
commit: env.GITHUB_SHA, | ||
isPr, | ||
branch, | ||
prBranch: isPr ? branch : undefined, | ||
slug: env.GITHUB_REPOSITORY, | ||
root: env.GITHUB_WORKSPACE, | ||
}, | ||
isPr ? getPrEvent({env, cwd}) : undefined | ||
); | ||
return { | ||
name: 'GitHub Actions', | ||
service: 'github', | ||
commit: env.GITHUB_SHA, | ||
isPr, | ||
branch, | ||
prBranch: isPr ? branch : undefined, | ||
slug: env.GITHUB_REPOSITORY, | ||
root: env.GITHUB_WORKSPACE, | ||
...(isPr ? getPrEvent({env, cwd}) : undefined), | ||
}; | ||
}, | ||
}; |
@@ -40,13 +40,11 @@ // https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters | ||
configuration({env, cwd}) { | ||
return Object.assign( | ||
{ | ||
name: 'TeamCity', | ||
service: 'teamcity', | ||
commit: env.BUILD_VCS_NUMBER, | ||
build: env.BUILD_NUMBER, | ||
slug: env.TEAMCITY_BUILDCONF_NAME, | ||
}, | ||
getProperties({env, cwd}) | ||
); | ||
return { | ||
name: 'TeamCity', | ||
service: 'teamcity', | ||
commit: env.BUILD_VCS_NUMBER, | ||
build: env.BUILD_NUMBER, | ||
slug: env.TEAMCITY_BUILDCONF_NAME, | ||
...getProperties({env, cwd}), | ||
}; | ||
}, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38430
595