@mountainpass/problem-document 0.0.46 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc.json +1 -2
- package/.cspell.json +4 -17
- package/.dry-aged-deps.json +25 -0
- package/.eslintignore +0 -5
- package/.gitattributes +1 -34
- package/.husky/pre-push +2 -1
- package/.prettierignore +0 -1
- package/.project-words.txt +4 -1
- package/.yarnrc +1 -0
- package/README.md +0 -17
- package/lib/index.d.ts +3 -3
- package/package.json +16 -31
- package/.projenrc.ts +0 -96
package/.commitlintrc.json
CHANGED
package/.cspell.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"cli",
|
|
6
6
|
"config-conventional",
|
|
7
7
|
"mountainpass",
|
|
8
|
-
"cool-bits-for-projen",
|
|
9
8
|
"types",
|
|
10
9
|
"http-status-codes",
|
|
11
10
|
"jest",
|
|
@@ -14,6 +13,7 @@
|
|
|
14
13
|
"eslint-plugin",
|
|
15
14
|
"parser",
|
|
16
15
|
"cspell",
|
|
16
|
+
"dry-aged-deps",
|
|
17
17
|
"eslint-config-prettier",
|
|
18
18
|
"eslint-import-resolver-node",
|
|
19
19
|
"eslint-import-resolver-typescript",
|
|
@@ -27,20 +27,11 @@
|
|
|
27
27
|
"husky",
|
|
28
28
|
"jest-junit",
|
|
29
29
|
"json-schema",
|
|
30
|
-
"npm-check-updates",
|
|
31
30
|
"prettier",
|
|
32
|
-
"projen",
|
|
33
|
-
"standard-version",
|
|
34
31
|
"ts-jest",
|
|
35
|
-
"ts-node",
|
|
36
32
|
"typescript",
|
|
37
|
-
"projenrc",
|
|
38
|
-
"docgen",
|
|
39
|
-
"unbump",
|
|
40
33
|
"lcov",
|
|
41
34
|
"cobertura",
|
|
42
|
-
"MarkMcCulloh",
|
|
43
|
-
"vscode-projen",
|
|
44
35
|
"dbaeumer",
|
|
45
36
|
"vscode-eslint",
|
|
46
37
|
"esbenp",
|
|
@@ -90,6 +81,7 @@
|
|
|
90
81
|
],
|
|
91
82
|
"ignorePaths": [
|
|
92
83
|
"docs",
|
|
84
|
+
".dry-aged-deps.json",
|
|
93
85
|
".eslintignore",
|
|
94
86
|
".eslintrc-json.json",
|
|
95
87
|
".eslintrc.json",
|
|
@@ -101,14 +93,10 @@
|
|
|
101
93
|
".github/workflows/release.yml",
|
|
102
94
|
".github/workflows/upgrade-main.yml",
|
|
103
95
|
".gitignore",
|
|
104
|
-
".mergify.yml",
|
|
105
96
|
".npmignore",
|
|
106
97
|
".prettierignore",
|
|
107
98
|
".prettierrc.json",
|
|
108
|
-
|
|
109
|
-
".projen/files.json",
|
|
110
|
-
".projen/tasks.json",
|
|
111
|
-
".vscode/settings.json",
|
|
99
|
+
".vscode/settings.json",
|
|
112
100
|
"CODE_OF_CONDUCT.md",
|
|
113
101
|
"LICENSE",
|
|
114
102
|
"package.json",
|
|
@@ -124,6 +112,5 @@
|
|
|
124
112
|
"socio-economic"
|
|
125
113
|
]
|
|
126
114
|
}
|
|
127
|
-
]
|
|
128
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
|
|
115
|
+
]
|
|
129
116
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"exclude": {
|
|
3
|
+
"@commitlint/cli": "Major version upgrade; requires migration to v20 config format",
|
|
4
|
+
"@commitlint/config-conventional": "Major version upgrade; blocked by @commitlint/cli constraint",
|
|
5
|
+
"@types/jest": "Pinned to jest 27.x; upgrade requires jest 29+ migration",
|
|
6
|
+
"@types/node": "Pinned to ^14; upgrade requires verifying Node.js API compatibility",
|
|
7
|
+
"cspell": "Major version upgrade; requires compatibility testing with current config",
|
|
8
|
+
"eslint": "Pinned to ^8; upgrade to 9+ requires flat config migration and plugin compatibility",
|
|
9
|
+
"eslint-config-prettier": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
10
|
+
"eslint-import-resolver-node": "Pinned by eslint-plugin-import compatibility",
|
|
11
|
+
"eslint-import-resolver-typescript": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
12
|
+
"eslint-plugin-import": "Pinned by eslint 8.x compatibility",
|
|
13
|
+
"eslint-plugin-jsdoc": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
14
|
+
"eslint-plugin-jsonc": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
15
|
+
"eslint-plugin-no-secrets": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
16
|
+
"eslint-plugin-prettier": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
17
|
+
"eslint-plugin-unicorn": "Major version upgrade; blocked by eslint 8.x constraint",
|
|
18
|
+
"husky": "Major version upgrade; requires migration to new config format",
|
|
19
|
+
"jest": "Pinned to ^27; upgrade requires ts-jest migration",
|
|
20
|
+
"jest-junit": "Major version upgrade; blocked by jest 27.x constraint",
|
|
21
|
+
"prettier": "Major version upgrade; may cause formatting changes across codebase",
|
|
22
|
+
"ts-jest": "Pinned to jest 27.x; upgrade requires jest migration",
|
|
23
|
+
"typescript": "Major version upgrade; requires codebase compatibility verification"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/.eslintignore
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
2
1
|
.commitlintrc.json
|
|
3
2
|
.cspell.json
|
|
4
3
|
.eslintignore
|
|
@@ -15,13 +14,9 @@
|
|
|
15
14
|
.husky/commit-msg
|
|
16
15
|
.husky/pre-commit
|
|
17
16
|
.husky/pre-push
|
|
18
|
-
.mergify.yml
|
|
19
17
|
.npmignore
|
|
20
18
|
.prettierignore
|
|
21
19
|
.prettierrc.json
|
|
22
|
-
.projen/deps.json
|
|
23
|
-
.projen/files.json
|
|
24
|
-
.projen/tasks.json
|
|
25
20
|
.vscode/extensions.json
|
|
26
21
|
.vscode/settings.json
|
|
27
22
|
CODE_OF_CONDUCT.md
|
package/.gitattributes
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
2
|
-
|
|
3
1
|
*.snap linguist-generated
|
|
4
|
-
|
|
5
|
-
/.cspell.json linguist-generated
|
|
6
|
-
/.eslintignore linguist-generated
|
|
7
|
-
/.eslintrc-json.json linguist-generated
|
|
8
|
-
/.eslintrc.json linguist-generated
|
|
9
|
-
/.gitattributes linguist-generated
|
|
10
|
-
/.github/pull_request_template.md linguist-generated
|
|
11
|
-
/.github/workflows/auto-approve.yml linguist-generated
|
|
12
|
-
/.github/workflows/build.yml linguist-generated
|
|
13
|
-
/.github/workflows/pull-request-lint.yml linguist-generated
|
|
14
|
-
/.github/workflows/release.yml linguist-generated
|
|
15
|
-
/.github/workflows/upgrade-main.yml linguist-generated
|
|
16
|
-
/.gitignore linguist-generated
|
|
17
|
-
/.husky/commit-msg linguist-generated
|
|
18
|
-
/.husky/pre-commit linguist-generated
|
|
19
|
-
/.husky/pre-push linguist-generated
|
|
20
|
-
/.mergify.yml linguist-generated
|
|
21
|
-
/.npmignore linguist-generated
|
|
22
|
-
/.prettierignore linguist-generated
|
|
23
|
-
/.prettierrc.json linguist-generated
|
|
24
|
-
/.projen/** linguist-generated
|
|
25
|
-
/.projen/deps.json linguist-generated
|
|
26
|
-
/.projen/files.json linguist-generated
|
|
27
|
-
/.projen/tasks.json linguist-generated
|
|
28
|
-
/.vscode/extensions.json linguist-generated
|
|
29
|
-
/.vscode/settings.json linguist-generated
|
|
30
|
-
/CODE_OF_CONDUCT.md linguist-generated
|
|
31
|
-
/LICENSE linguist-generated
|
|
32
|
-
/package.json linguist-generated
|
|
33
|
-
/tsconfig.dev.json linguist-generated
|
|
34
|
-
/tsconfig.json linguist-generated
|
|
35
|
-
/yarn.lock linguist-generated
|
|
2
|
+
/yarn.lock linguist-generated
|
package/.husky/pre-push
CHANGED
package/.prettierignore
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
package/.project-words.txt
CHANGED
package/.yarnrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--ignore-engines true
|
package/README.md
CHANGED
|
@@ -36,23 +36,6 @@ run the following command in your project
|
|
|
36
36
|
yarn add @mountainpass/problem-document
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
### projen
|
|
40
|
-
|
|
41
|
-
Add `@mountainpass/problem-document` to your `deps` in your `.projen.js` or `projen.ts`. e.g.
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
///...
|
|
45
|
-
const project = new NodeProject({
|
|
46
|
-
//...
|
|
47
|
-
deps: [
|
|
48
|
-
//...
|
|
49
|
-
'@mountainpass/problem-document'
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
and run `npx projen`
|
|
55
|
-
|
|
56
39
|
## Usage
|
|
57
40
|
|
|
58
41
|
```js
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Http Status Codes from https://github.com/prettymuchbryce/http-status-codes/blob/master/src/status-codes.ts under MIT License
|
|
3
3
|
* If you know how to convert numeric enum values to a union type, please submit a PR.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
type StatusCode =
|
|
6
6
|
/**
|
|
7
7
|
* ACCEPTED
|
|
8
8
|
* Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.3
|
|
@@ -406,7 +406,7 @@ declare type StatusCode =
|
|
|
406
406
|
/**
|
|
407
407
|
* Base class for Problem Documents, which includes the non-extension fields
|
|
408
408
|
*/
|
|
409
|
-
export
|
|
409
|
+
export type BaseProblemDocumentProperties = {
|
|
410
410
|
/**
|
|
411
411
|
* A URI reference [{@link https://datatracker.ietf.org/doc/html/rfc3986 RFC3986}] that identifies the
|
|
412
412
|
* problem type. This specification encourages that, when
|
|
@@ -444,7 +444,7 @@ export declare type BaseProblemDocumentProperties = {
|
|
|
444
444
|
*
|
|
445
445
|
* Note the use of Omit, this allows auto-completion of the base fields
|
|
446
446
|
*/
|
|
447
|
-
export
|
|
447
|
+
export type ProblemDocumentProperties = Omit<Record<string, unknown>, keyof BaseProblemDocumentProperties> & BaseProblemDocumentProperties;
|
|
448
448
|
/**
|
|
449
449
|
*
|
|
450
450
|
* This class implements RFC7807 "problem detail", a way to carry machine-
|
package/package.json
CHANGED
|
@@ -6,28 +6,17 @@
|
|
|
6
6
|
"url": "https://github.com/mountain-pass/problem-document.git"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"pre-compile": "npx projen pre-compile",
|
|
21
|
-
"prepare": "npx projen prepare",
|
|
22
|
-
"release": "npx projen release",
|
|
23
|
-
"spellcheck": "npx projen spellcheck",
|
|
24
|
-
"test": "npx projen test",
|
|
25
|
-
"test:update": "npx projen test:update",
|
|
26
|
-
"test:watch": "npx projen test:watch",
|
|
27
|
-
"unbump": "npx projen unbump",
|
|
28
|
-
"upgrade": "npx projen upgrade",
|
|
29
|
-
"watch": "npx projen watch",
|
|
30
|
-
"projen": "npx projen"
|
|
9
|
+
"build": "npm run compile && npm run test && npm run package",
|
|
10
|
+
"compile": "tsc --build",
|
|
11
|
+
"eslint": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools",
|
|
12
|
+
"eslint:json": "eslint --no-eslintrc --no-error-on-unmatched-pattern --config .eslintrc-json.json --ext .json .",
|
|
13
|
+
"package": "mkdir -p dist/js && npm pack --pack-destination dist/js",
|
|
14
|
+
"prepare": "husky install",
|
|
15
|
+
"spellcheck": "cspell lint --gitignore --dot --show-suggestions -e \".git/**\" \"**\"",
|
|
16
|
+
"test": "jest --passWithNoTests --all --updateSnapshot && npm run eslint && npm run spellcheck && npm run eslint:json",
|
|
17
|
+
"test:update": "jest --updateSnapshot",
|
|
18
|
+
"test:watch": "jest --watch",
|
|
19
|
+
"watch": "tsc --build -w"
|
|
31
20
|
},
|
|
32
21
|
"author": {
|
|
33
22
|
"name": "Mountain Pass",
|
|
@@ -38,13 +27,13 @@
|
|
|
38
27
|
"devDependencies": {
|
|
39
28
|
"@commitlint/cli": "^17.0.2",
|
|
40
29
|
"@commitlint/config-conventional": "^17.0.2",
|
|
41
|
-
"@mountainpass/cool-bits-for-projen": "^0.2.4",
|
|
42
30
|
"@types/http-status-codes": "^1.2.0",
|
|
43
31
|
"@types/jest": "^27.4.1",
|
|
44
32
|
"@types/node": "^14",
|
|
45
33
|
"@typescript-eslint/eslint-plugin": "^5",
|
|
46
34
|
"@typescript-eslint/parser": "^5",
|
|
47
35
|
"cspell": "*",
|
|
36
|
+
"dry-aged-deps": "^2.6.0",
|
|
48
37
|
"eslint": "^8",
|
|
49
38
|
"eslint-config-prettier": "^8.5.0",
|
|
50
39
|
"eslint-import-resolver-node": "^0.3.6",
|
|
@@ -60,12 +49,8 @@
|
|
|
60
49
|
"jest": "^27",
|
|
61
50
|
"jest-junit": "^13",
|
|
62
51
|
"json-schema": "^0.4.0",
|
|
63
|
-
"npm-check-updates": "^12",
|
|
64
52
|
"prettier": "^2.6.2",
|
|
65
|
-
"projen": "^0.58.15",
|
|
66
|
-
"standard-version": "^9",
|
|
67
53
|
"ts-jest": "^27",
|
|
68
|
-
"ts-node": "^10.8.0",
|
|
69
54
|
"typescript": "^4.6.3"
|
|
70
55
|
},
|
|
71
56
|
"keywords": [
|
|
@@ -78,7 +63,7 @@
|
|
|
78
63
|
"publishConfig": {
|
|
79
64
|
"access": "public"
|
|
80
65
|
},
|
|
81
|
-
"version": "0.0.
|
|
66
|
+
"version": "0.0.49",
|
|
82
67
|
"bugs": {
|
|
83
68
|
"url": "https://github.com/mountain-pass/problem-document/issues"
|
|
84
69
|
},
|
|
@@ -132,8 +117,8 @@
|
|
|
132
117
|
},
|
|
133
118
|
"types": "lib/index.d.ts",
|
|
134
119
|
"contributors": [
|
|
120
|
+
"Claude <noreply@anthropic.com>",
|
|
135
121
|
"Tom Howard <tom@windyroad.com.au>",
|
|
136
122
|
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>"
|
|
137
|
-
]
|
|
138
|
-
|
|
139
|
-
}
|
|
123
|
+
]
|
|
124
|
+
}
|
package/.projenrc.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CodeOfConduct,
|
|
3
|
-
GitHubber,
|
|
4
|
-
NpmReleaser,
|
|
5
|
-
Organisational,
|
|
6
|
-
Recommended,
|
|
7
|
-
} from "@mountainpass/cool-bits-for-projen";
|
|
8
|
-
import { NpmAccess } from "projen/lib/javascript";
|
|
9
|
-
import { TypeScriptProject } from "projen/lib/typescript";
|
|
10
|
-
|
|
11
|
-
const gitHubber = new GitHubber({
|
|
12
|
-
name: "problem-document",
|
|
13
|
-
username: "mountain-pass",
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const npmReleaser = new NpmReleaser(gitHubber, {
|
|
17
|
-
scope: "mountainpass",
|
|
18
|
-
access: NpmAccess.PUBLIC,
|
|
19
|
-
release: true,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const organisational = new Organisational({
|
|
23
|
-
organisation: {
|
|
24
|
-
name: "Mountain Pass",
|
|
25
|
-
email: "info@mountain-pass.com.au",
|
|
26
|
-
url: "https://mountain-pass.com.au",
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const project = new TypeScriptProject({
|
|
31
|
-
...gitHubber.nodeProjectOptions(),
|
|
32
|
-
...organisational.nodeProjectOptions(),
|
|
33
|
-
...npmReleaser.nodeProjectOptions(),
|
|
34
|
-
...Recommended.defaultProjectOptions,
|
|
35
|
-
description:
|
|
36
|
-
"A basic RFC7807 Problem Details document with basic type checking and autocomplete" /* The description is just a string that helps people understand the purpose of the package. */,
|
|
37
|
-
deps: [] /* Runtime dependencies of this module. */,
|
|
38
|
-
devDeps: [
|
|
39
|
-
"http-status-codes",
|
|
40
|
-
"@types/http-status-codes",
|
|
41
|
-
"@mountainpass/cool-bits-for-projen",
|
|
42
|
-
] /* Build dependencies for this module. */,
|
|
43
|
-
keywords: ["problem-details", "rfc7807"],
|
|
44
|
-
defaultReleaseBranch: "main",
|
|
45
|
-
projenrcTs: true,
|
|
46
|
-
dependabotOptions: {
|
|
47
|
-
labels: ["auto-approve"],
|
|
48
|
-
},
|
|
49
|
-
jestOptions: {
|
|
50
|
-
jestConfig: {
|
|
51
|
-
coverageThreshold: {
|
|
52
|
-
branches: 100,
|
|
53
|
-
functions: 100,
|
|
54
|
-
lines: 100,
|
|
55
|
-
statements: 100,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
autoApproveUpgrades: true,
|
|
60
|
-
autoApproveOptions: {
|
|
61
|
-
allowedUsernames: ["dependabot[bot]"],
|
|
62
|
-
label: "auto-approve",
|
|
63
|
-
secret: "GITHUB_TOKEN",
|
|
64
|
-
},
|
|
65
|
-
githubOptions: {
|
|
66
|
-
pullRequestLintOptions: {
|
|
67
|
-
semanticTitleOptions: {
|
|
68
|
-
types: [
|
|
69
|
-
"build",
|
|
70
|
-
"chore",
|
|
71
|
-
"ci",
|
|
72
|
-
"docs",
|
|
73
|
-
"feat",
|
|
74
|
-
"fix",
|
|
75
|
-
"perf",
|
|
76
|
-
"refactor",
|
|
77
|
-
"revert",
|
|
78
|
-
"style",
|
|
79
|
-
"test",
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
new Recommended(project, {
|
|
87
|
-
cSpellOptions: { language: "en-GB", ignorePaths: ["docs"] },
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
new CodeOfConduct(project, { contactMethod: "tom@mountain-pass.com.au" });
|
|
91
|
-
|
|
92
|
-
gitHubber.addToProject(project);
|
|
93
|
-
npmReleaser.addToProject(project);
|
|
94
|
-
organisational.addToProject(project);
|
|
95
|
-
|
|
96
|
-
project.synth();
|