Skip to content

Commit

Permalink
refactor: use @tsconfig/node16 (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee authored Apr 26, 2023
1 parent 5fcc920 commit 1bf6b3a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.7",
"@semantic-release/npm": "9.0.2",
"@tsconfig/node16": "1.0.3",
"@types/node": "16.18.23",
"@typescript-eslint/eslint-plugin": "5.59.0",
"@typescript-eslint/parser": "5.59.0",
Expand Down
4 changes: 3 additions & 1 deletion src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class Input {
? new RegExp(envRegexInput)
: this.options.envRegex;
this._environmentVariables = new Map(
Object.entries(process.env).filter(([key]) => envRegex.test(key))
Object.entries(process.env)
.filter(([key]) => envRegex.test(key))
.filter((pair): pair is [string, string] => pair[1] !== undefined)
);

this.token = this.get(
Expand Down
9 changes: 5 additions & 4 deletions src/renovate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ class Renovate {
.map((e) => `--env ${e.key}`)
.concat([`--env ${this.input.token.key}=${this.input.token.value}`]);

if (this.input.configurationFile() !== null) {
const baseName = path.basename(this.input.configurationFile().value);
const configurationFile = this.input.configurationFile();
if (configurationFile !== null) {
const baseName = path.basename(configurationFile.value);
const mountPath = path.join(this.configFileMountDir, baseName);
dockerArguments.push(
`--env ${this.input.configurationFile().key}=${mountPath}`,
`--volume ${this.input.configurationFile().value}:${mountPath}`
`--env ${configurationFile.key}=${mountPath}`,
`--volume ${configurationFile.value}:${mountPath}`
);
}

Expand Down
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"outDir": "dist"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1"
integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==

"@tsconfig/node16@^1.0.2":
"@tsconfig/node16@1.0.3", "@tsconfig/node16@^1.0.2":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==
Expand Down

0 comments on commit 1bf6b3a

Please sign in to comment.