Skip to content

Commit

Permalink
yarn: Upgrade dependencies and drop node 16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjD90 committed Oct 27, 2023
1 parent 5252bbf commit d302cf8
Show file tree
Hide file tree
Showing 7 changed files with 403 additions and 398 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ npm install --save @neo9/n9-node-conf

## V2 Upgrade

- Drop Node.js V 16 support as it has reached end of life
- Change extendConfig setting from `string` to `object`.
Example :

Expand Down
4 changes: 2 additions & 2 deletions documentation/extendable-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default conf;

to override it for user a, create a file `env.json` or `env.yaml` :

env.json : (remove comments)
`env.json` : (remove comments)

```json5
{
Expand All @@ -43,7 +43,7 @@ env.json : (remove comments)
}
```

env.yaml :
`env.yaml` :

```yaml
application: # choose which environment you want to override, you can overide all with one file
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"homepage": "https://github.com/neo9/n9-node-conf#readme",
"engines": {
"node": ">= 16.20"
"node": ">= 18"
},
"dependencies": {
"app-root-dir": "^1.0.2",
Expand All @@ -53,15 +53,15 @@
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@commitlint/cli": "^17.7.1",
"@neo9/n9-coding-style": "^5.1.2",
"@commitlint/cli": "^18.2.0",
"@neo9/n9-coding-style": "^6.0.0-rc.3",
"@release-it/conventional-changelog": "^7.0.1",
"@tsconfig/node16": "^16.1.1",
"@types/app-root-dir": "^0.1.0",
"@types/debug": "^4.1.8",
"@types/js-yaml": "^4.0.1",
"@types/lodash": "^4.14.169",
"@types/node": "^20.5.9",
"@types/app-root-dir": "^0.1.3",
"@types/debug": "^4.1.10",
"@types/js-yaml": "^4.0.8",
"@types/lodash": "^4.14.200",
"@types/node": "^20.8.9",
"ava": "^5.3.1",
"husky": "^4.3.8",
"nyc": "^15.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'node:fs';

import * as appRootDir from 'app-root-dir';
import * as AppRootDir from 'app-root-dir';
import * as debug from 'debug';
import * as JsYaml from 'js-yaml';
import * as _ from 'lodash';
Expand Down Expand Up @@ -180,7 +180,7 @@ function getConfigKeyWithFormat(
}

export default (options: N9ConfOptions = {}): object | any => {
const rootDir = appRootDir.get();
const rootDir = AppRootDir.get();
const confPath: string = process.env.NODE_CONF_PATH || options.path || Path.join(rootDir, 'conf');
const packageJsonDirPath = Path.join(
options.overridePackageJsonDirPath || rootDir,
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as appRootDir from 'app-root-dir';
import * as AppRootDir from 'app-root-dir';
import test from 'ava';
import { join } from 'path';

import src from '../src';

/* eslint-disable-next-line import/no-dynamic-require, @typescript-eslint/no-var-requires, global-require */
const app = require(join(appRootDir.get(), 'package.json'));
const app = require(join(AppRootDir.get(), 'package.json'));

test('Simple use case', (t) => {
delete process.env.NODE_ENV;
Expand Down
Loading

0 comments on commit d302cf8

Please sign in to comment.