Skip to content

Commit 6e55fbd

Browse files
Merge pull request opentripplanner#7488 from entur/fix/harden-npm
Improve npm package repository security
2 parents 638e5bb + 20da10f commit 6e55fbd

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

client/.npmrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
save-exact=true
1+
save-exact=true
2+
prefer-offline=false
3+
ignore-scripts=true
4+
min-release-age=7
5+
allow-git=none

client/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc && vite build",
7+
"dev": "npm run codegen && vite",
8+
"build": "npm run codegen && npm run lint && npm run check-format && tsc && vite build",
99
"test": "vitest --root src/",
1010
"coverage": "vitest run --root src/ --coverage",
1111
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
1212
"check-format": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
1313
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
1414
"preview": "vite preview",
15-
"prebuild": "npm run codegen && npm run lint && npm run check-format",
16-
"predev": "npm run codegen",
17-
"codegen-preprocess": "graphql-codegen --config codegen-preprocess.ts",
18-
"precodegen": "npm run codegen-preprocess",
19-
"codegen": "graphql-codegen --config codegen.ts"
15+
"codegen": "graphql-codegen --config codegen-preprocess.ts && graphql-codegen --config codegen.ts"
2016
},
2117
"dependencies": {
2218
"@googlemaps/polyline-codec": "1.0.28",

renovate.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@
3333
"matchUpdateTypes": ["patch", "minor"],
3434
"groupName": "Debug UI dependencies (non-major)",
3535
"schedule": ["after 6pm on the 17th day of the month"],
36+
"minimumReleaseAge": "4 days",
3637
"reviewers": ["testower"],
3738
"postUpdateOptions": ["npmInstallTwice"]
3839
},
3940
{
4041
"matchFiles": ["client/package.json"],
4142
"matchUpdateTypes": ["major"],
43+
"minimumReleaseAge": "4 days",
4244
"reviewers": ["testower"],
4345
"postUpdateOptions": ["npmInstallTwice"]
4446
},
@@ -116,6 +118,7 @@
116118
{
117119
"groupName": "GTFS API code generation",
118120
"matchFiles": ["application/src/main/java/org/opentripplanner/apis/gtfs/generated/package.json"],
121+
"minimumReleaseAge": "4 days",
119122
"reviewers": ["optionsome", "leonardehrenfried"],
120123
"schedule": "on the 11th through 12th day of the month"
121124
},

0 commit comments

Comments
 (0)