Skip to content

Commit

Permalink
Update a bunch of dependencies to remove vunerability (#28)
Browse files Browse the repository at this point in the history
update to npm and removed yarn
update husky pre-commit for new husky version

update support for node 16
formatted all files with new prettier
  • Loading branch information
darrenpicard25 authored Oct 20, 2021
1 parent 2daef19 commit d53d551
Show file tree
Hide file tree
Showing 26 changed files with 13,706 additions and 5,472 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,23 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
node: [8, 10, 12, 14]
node: [10, 12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node modules
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: 'npm'
- name: Install
run: yarn --prefer-offline --frozen-lockfile --no-progress --non-interactive
run: npm ci
- name: Format Check
run: npm run format:check
- name: Lint
run: yarn lint
run: npm run lint
- name: Build
run: yarn build
run: npm run build
- name: Test
run: yarn test --coverage
run: npm run test --coverage
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run pre-commit
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.7.1 (October 16, 2021)

- switched to npm
- updated dependencies

## 1.7.0 (May 14, 2021)

- Add feature to override aws secrets configs with environment variables
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Config loader with support for AWS Secrets Manager.
```ts
// config.default.ts
export default {
API_ENDPOINT: 'https://api.kanye.rest/'
API_ENDPOINT: 'https://api.kanye.rest/',
};
```

```js
// config.default.js
module.exports = {
API_ENDPOINT: 'https://api.kanye.rest/'
API_ENDPOINT: 'https://api.kanye.rest/',
};
```

Expand All @@ -56,7 +56,6 @@ Import `config-dug` anywhere in your code where you want to access your config.
import config from 'config-dug';

console.log(config.API_ENDPOINT);
// https://api.kanye.rest/
```

```js
Expand All @@ -77,7 +76,7 @@ In order to use AWS Secrets Manager you have to add a `AWS_SECRETS_MANAGER_NAME`
// config.default.ts
export default {
AWS_SECRETS_MANAGER_NAME: 'production/myapp/config',
API_ENDPOINT: 'https://api.kanye.rest/'
API_ENDPOINT: 'https://api.kanye.rest/',
};
```

Expand All @@ -87,7 +86,7 @@ If you need to read from multiple secret buckets, `AWS_SECRETS_MANAGER_NAMES` ta
// config.default.ts
export default {
AWS_SECRETS_MANAGER_NAMES: 'production/myapp/config,production/myapp/another-config',
API_ENDPOINT: 'https://api.kanye.rest/'
API_ENDPOINT: 'https://api.kanye.rest/',
};
```

Expand Down Expand Up @@ -139,8 +138,8 @@ This will import your config files from the `config` directory. The path you spe

1. Fork this repo
1. Clone the forked repo
1. Install dependencies: `yarn`
1. Run tests: `yarn test`
1. Install dependencies: `npm install` OR `npm i`
1. Run tests: `npm run test`

## Publishing

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
testEnvironment: 'node',
};
Loading

0 comments on commit d53d551

Please sign in to comment.