Skip to content

Commit

Permalink
fix: bump deps
Browse files Browse the repository at this point in the history
* bump deps
* test in Node 15
* fix linter
  • Loading branch information
dbstratta committed Nov 28, 2020
1 parent 8d16e7e commit d8a5d27
Show file tree
Hide file tree
Showing 10 changed files with 2,402 additions and 2,543 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
parser: '@typescript-eslint/parser',

parserOptions: {
ecmaVersion: 2020,
ecmaVersion: 2021,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: './',
Expand All @@ -23,7 +23,7 @@ module.exports = {
],

env: {
es2020: true,
es2021: true,
jest: true,
node: true,
},
Expand Down Expand Up @@ -75,8 +75,6 @@ module.exports = {

'promise/valid-params': 'off',

'jest/no-try-expect': 'off',

'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-use-before-define': 'off',
Expand Down
26 changes: 0 additions & 26 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ Yes! You can have as many env objects as you want!
## Node.js support

Node.js version 10 or higher. Every version of this library
is tested in Node.js 10, 12 and 14.
is tested in Node.js 10, 12, 14 and 15.

## Contributing

Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
node_version: 12.x
node_14_x:
node_version: 14.x
node_15_x:
node_version: 15.x

steps:
- template: azure-pipelines/install.yml
Expand Down Expand Up @@ -70,4 +72,4 @@ jobs:

variables:
CI: true
defaultNodeVersion: '14.4.0'
defaultNodeVersion: '15.3.0'
55 changes: 21 additions & 34 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */
module.exports = (api) => {
const presets = [
[
'@babel/preset-env',
{
targets: {
node: 10,
return {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 10,
},
debug: !!process.env.DEBUG_BABEL,
useBuiltIns: false,
bugfixes: true,
},
debug: !!process.env.DEBUG_BABEL,
useBuiltIns: false,
bugfixes: true,
},
],
'@babel/preset-typescript',
],
'@babel/preset-typescript',
];

const plugins = ['dynamic-import-node'];

const ignore = getIgnoredPaths(api);

const sourceMaps = api.env('production') ? true : 'inline';

return {
presets,
plugins,
ignore,
sourceMaps,
plugins: [],
ignore: [
'node_modules',
api.env('production') && '**/*.spec.ts',
api.env('production') && '**/*.test.ts',
api.env('production') && '**/*.d.ts',
].filter(Boolean),
sourceMaps: api.env('production') ? true : 'inline',
};
};

function getIgnoredPaths(api) {
const baseIgnorePaths = ['node_modules'];

if (api.env('production')) {
return [...baseIgnorePaths, '**/*.spec.ts', '**/*.test.ts', '**/*.d.ts'];
}

return baseIgnorePaths;
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */
2 changes: 1 addition & 1 deletion examples/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"license": "MIT",
"private": true,
"dependencies": {
"@strattadb/environment": "^8.0.0"
"@strattadb/environment": "^8.0.2"
}
}
61 changes: 30 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,47 @@
"types": "dist/index.d.ts",
"private": false,
"dependencies": {
"debug": "^4.1.1",
"validator": "^13.0.0"
"debug": "^4.3.1",
"validator": "^13.1.17"
},
"devDependencies": {
"@babel/cli": "7.10.1",
"@babel/core": "7.10.2",
"@babel/preset-env": "7.10.2",
"@babel/preset-typescript": "7.10.1",
"@commitlint/cli": "8.3.5",
"@commitlint/config-conventional": "8.3.4",
"@commitlint/prompt-cli": "8.3.5",
"@babel/cli": "7.12.8",
"@babel/core": "7.12.9",
"@babel/preset-env": "7.12.7",
"@babel/preset-typescript": "7.12.7",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@commitlint/prompt-cli": "11.0.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"@types/debug": "4.1.5",
"@types/jest": "25.2.3",
"@types/node": "14.0.11",
"@types/validator": "13.0.0",
"@typescript-eslint/eslint-plugin": "3.1.0",
"@typescript-eslint/parser": "3.1.0",
"babel-jest": "26.0.1",
"babel-plugin-dynamic-import-node": "2.3.3",
"codecov": "3.7.0",
"@types/jest": "26.0.15",
"@types/node": "14.14.10",
"@types/validator": "13.1.0",
"@typescript-eslint/eslint-plugin": "4.8.2",
"@typescript-eslint/parser": "4.8.2",
"babel-jest": "26.6.3",
"codecov": "3.8.1",
"cross-env": "7.0.2",
"danger": "10.2.0",
"eslint": "7.2.0",
"eslint-config-airbnb-base": "14.1.0",
"eslint-config-prettier": "6.11.0",
"danger": "10.5.4",
"eslint": "7.14.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "6.15.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jest": "23.13.2",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.1.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-prettier": "3.1.4",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-security": "1.4.0",
"eslint-plugin-unicorn": "20.1.0",
"husky": "4.2.5",
"jest": "26.0.1",
"lint-staged": "10.2.9",
"prettier": "2.0.5",
"eslint-plugin-unicorn": "23.0.0",
"husky": "4.3.0",
"jest": "26.6.3",
"lint-staged": "10.5.2",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"semantic-release": "17.0.8",
"typescript": "3.9.5"
"semantic-release": "17.3.0",
"typescript": "4.1.2"
},
"keywords": [
"environment",
Expand Down
11 changes: 0 additions & 11 deletions renovate.json

This file was deleted.

6 changes: 2 additions & 4 deletions src/environment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('makeEnv', () => {

const description = 'this is a description';

try {
expect(() => {
makeEnv(
{
varWithDescription: {
Expand All @@ -140,9 +140,7 @@ describe('makeEnv', () => {
},
processEnv,
);
} catch (error) {
expect((error as Error).message).toContain(description);
}
}).toThrowError(description);
});

test('uses process.env if the processEnv argument is not provided', () => {
Expand Down
Loading

0 comments on commit d8a5d27

Please sign in to comment.