Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x
- name: Install dependencies
run: npm install
env:
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 20.x
- name: Install dependencies
run: npm install
env:
Expand All @@ -42,12 +42,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest is prohibitively expensive, use sparingly
node: [14.x, 12.x]
node: [16.x, 18.x, 20.x]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x
- name: Install dependencies
run: npm install
env:
Expand All @@ -29,11 +30,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
Expand All @@ -51,11 +52,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x
registry-url: https://npm.pkg.github.com/
always-auth: true
scope: "@jessety"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Git history won't be fetched without this option

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3

- name: Generate release notes # To change the release notes format, edit RELEASE.md.hbs
id: notes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"test": "npm run build && jest"
},
"dependencies": {
"env-smart": "^2.2.0",
"env-smart": "^2.3.1",
"inquirer": "^8.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/configFileEncryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export async function decrypt(environment = 'default', overwriteExisting = false

console.log(`Successfully decrypted "${encryptedFilename}" into "${decryptedFilename}"`);

} catch (error) {
} catch (error: unknown) {

console.error(error.message);
console.error(error);
throw error;
}
}
Expand Down Expand Up @@ -94,7 +94,7 @@ export async function encrypt(environment?: string, overwriteExisting = true): P

} catch (error) {

console.error(error.message);
console.error(error);
throw error;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/configForEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function environmentToConfigMap(configFileName = defaultConfigFileName):

} catch (error) {

console.warn(`Caught error reading config file ${configFileName}: ${error.message}`);
console.warn(`Caught error reading config file ${configFileName}:`, error);
return;
}
}
Expand Down
10 changes: 6 additions & 4 deletions test/encryption/SimpleEncryption.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import SimpleEncryption from '../../src/encryption/SimpleEncryption';

describe('SimpleEncryption', () => {
Expand Down Expand Up @@ -32,7 +34,7 @@ describe('SimpleEncryption', () => {
try {
const encryption = new SimpleEncryption('abc123');
encryption.encrypt('def456');
} catch (error) {
} catch (error: any) {
expect(error.code).toBe('KEY_INVALID');
}
});
Expand All @@ -43,7 +45,7 @@ describe('SimpleEncryption', () => {
try {
const encryption = new SimpleEncryption('abc123');
encryption.decrypt('abc123');
} catch (error) {
} catch (error: any) {
expect(error.code).toBe('KEY_INVALID');
}
});
Expand All @@ -54,14 +56,14 @@ describe('SimpleEncryption', () => {
try {
const encryption = new SimpleEncryption('a1361cb85be840d6a2d762c68e4910e2');
encryption.decrypt('abc123');
} catch (error) {
} catch (error: any) {
expect(error.code).toBe('STRING_INVALID');
}

try {
const encryption = new SimpleEncryption('a1361cb85be840d6a2d762c68e4910e2');
encryption.decrypt(true as unknown as string);
} catch (error) {
} catch (error: any) {
expect(error.code).toBe('STRING_INVALID');
}
});
Expand Down