Skip to content

Commit 33c3870

Browse files
authored
Merge pull request #8 from daiscog/feature/npm-audit
npm audit --fix and nx migrate
2 parents b6e1ac6 + 262e19e commit 33c3870

File tree

7 files changed

+30432
-9640
lines changed

7 files changed

+30432
-9640
lines changed

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v2
1616
with:
17-
node-version: 12
17+
node-version: 16
1818
registry-url: https://registry.npmjs.org/
1919
- run: npm ci
2020
- run: npm run build

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
1312
steps:
1413
- uses: actions/checkout@v2
1514
if: ${{ github.base_ref == 'main' }}
1615
with:
1716
ref: ${{ github.base_ref }}
1817
- uses: actions/checkout@v2
19-
- name: Use Node.js 12.x
18+
- name: Use Node.js 16.x
2019
uses: actions/setup-node@v2
2120
with:
22-
node-version: 12.x
21+
node-version: 16.x
2322
- run: npm ci
2423
- run: npm run build
2524
- run: npm run test

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

libs/ngx-http-request-state/package.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,44 @@
2121
"url": "https://github.com/daiscog/ngx-http-request-state.git",
2222
"directory": "libs/ngx-http-request-state"
2323
},
24-
"license": "MIT"
24+
"license": "MIT",
25+
"nx": {
26+
"targets": {
27+
"build": {
28+
"executor": "@nrwl/angular:package",
29+
"options": {
30+
"tsConfig": "libs/ngx-http-request-state/tsconfig.lib.json",
31+
"project": "libs/ngx-http-request-state/ng-package.json",
32+
"updateBuildableProjectDepsInPackageJson": true
33+
},
34+
"configurations": {
35+
"production": {
36+
"tsConfig": "libs/ngx-http-request-state/tsconfig.lib.prod.json"
37+
}
38+
}
39+
},
40+
"lint": {
41+
"executor": "@nrwl/linter:eslint",
42+
"options": {
43+
"lintFilePatterns": [
44+
"libs/ngx-http-request-state/src/**/*.ts",
45+
"libs/ngx-http-request-state/src/**/*.html"
46+
]
47+
},
48+
"outputs": [
49+
"{options.outputFile}"
50+
]
51+
},
52+
"test": {
53+
"executor": "@nrwl/jest:jest",
54+
"outputs": [
55+
"{workspaceRoot}/coverage/libs/ngx-http-request-state"
56+
],
57+
"options": {
58+
"jestConfig": "libs/ngx-http-request-state/jest.config.ts",
59+
"passWithNoTests": true
60+
}
61+
}
62+
}
63+
}
2564
}

nx.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"implicitDependencies": {
3-
"package.json": {
4-
"dependencies": "*",
5-
"devDependencies": "*"
6-
},
7-
".eslintrc.json": "*"
8-
},
92
"affected": {
103
"defaultBase": "origin/main"
114
},
@@ -54,5 +47,24 @@
5447
"style": "css",
5548
"changeDetection": "OnPush"
5649
}
50+
},
51+
"targetDefaults": {
52+
"e2e": {
53+
"inputs": ["default", "^default"]
54+
},
55+
"test": {
56+
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"]
57+
},
58+
"lint": {
59+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
60+
},
61+
"build": {
62+
"inputs": ["production", "^production"]
63+
}
64+
},
65+
"namedInputs": {
66+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
67+
"sharedGlobals": [],
68+
"production": ["default"]
5769
}
5870
}

0 commit comments

Comments
 (0)