@meza/adr-tools 1.0.10 → 1.0.11
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/.gitattributes +40 -0
- package/.github/renovate.json +5 -0
- package/.github/workflows/ci-pr.yml +44 -0
- package/.github/workflows/ci.yml +19 -20
- package/.github/workflows/sync-deps-to-main.yml +25 -0
- package/.github/workflows/sync-to-deps.yml +26 -0
- package/.releaserc.json +2 -7
- package/CHANGELOG.md +69 -0
- package/LICENSE +674 -0
- package/README.md +64 -5
- package/biome.json +148 -0
- package/dist/index.js +52 -82
- package/dist/index.js.map +1 -1
- package/dist/lib/adr.js +99 -125
- package/dist/lib/adr.js.map +1 -1
- package/dist/lib/config.js +20 -37
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/links.js +8 -25
- package/dist/lib/links.js.map +1 -1
- package/dist/lib/links.test.js +35 -64
- package/dist/lib/links.test.js.map +1 -1
- package/dist/lib/manipulator.js +22 -23
- package/dist/lib/manipulator.js.map +1 -1
- package/dist/lib/manipulator.test.js +59 -63
- package/dist/lib/manipulator.test.js.map +1 -1
- package/dist/lib/numbering.js +9 -48
- package/dist/lib/numbering.js.map +1 -1
- package/dist/lib/numbering.test.js +27 -44
- package/dist/lib/numbering.test.js.map +1 -1
- package/dist/lib/prompt.js +14 -0
- package/dist/lib/prompt.js.map +1 -0
- package/dist/lib/prompt.test.js +33 -0
- package/dist/lib/prompt.test.js.map +1 -0
- package/dist/lib/template.js +13 -26
- package/dist/lib/template.js.map +1 -1
- package/dist/types/lib/adr.d.ts.map +1 -1
- package/dist/types/lib/config.d.ts.map +1 -1
- package/dist/types/lib/links.d.ts.map +1 -1
- package/dist/types/lib/manipulator.d.ts.map +1 -1
- package/dist/types/lib/numbering.d.ts.map +1 -1
- package/dist/types/lib/prompt.d.ts +2 -0
- package/dist/types/lib/prompt.d.ts.map +1 -0
- package/dist/types/lib/prompt.test.d.ts +2 -0
- package/dist/types/lib/prompt.test.d.ts.map +1 -0
- package/dist/types/lib/template.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -4
- package/dist/version.js.map +1 -1
- package/doc/adr/.adr-sequence.lock +1 -0
- package/doc/adr/decisions.md +3 -0
- package/package.json +73 -47
- package/src/index.ts +52 -27
- package/src/lib/adr.ts +67 -72
- package/src/lib/config.ts +3 -3
- package/src/lib/links.test.ts +8 -24
- package/src/lib/links.ts +2 -2
- package/src/lib/manipulator.test.ts +44 -47
- package/src/lib/manipulator.ts +22 -10
- package/src/lib/numbering.test.ts +5 -9
- package/src/lib/numbering.ts +4 -5
- package/src/lib/prompt.test.ts +42 -0
- package/src/lib/prompt.ts +14 -0
- package/src/lib/template.ts +7 -3
- package/src/version.ts +1 -1
- package/tests/.adr-dir +1 -0
- package/tests/__snapshots__/generate-graph.e2e.test.ts.snap +23 -23
- package/tests/__snapshots__/init-adr-repository.e2e.test.ts.snap +1 -1
- package/tests/__snapshots__/linking-records.e2e.test.ts.snap +1 -1
- package/tests/__snapshots__/new-adr.e2e.test.ts.snap +1 -1
- package/tests/__snapshots__/superseding-records.e2e.test.ts.snap +1 -1
- package/tests/__snapshots__/toc-prefixing.e2e.test.ts.snap +1 -1
- package/tests/__snapshots__/use-template-override.e2e.test.ts.snap +1 -1
- package/tests/edit-on-create.e2e.test.ts +17 -12
- package/tests/funny-characters.e2e.test.ts +28 -21
- package/tests/generate-graph.e2e.test.ts +21 -13
- package/tests/init-adr-repository.e2e.test.ts +12 -8
- package/tests/linking-records.e2e.test.ts +21 -14
- package/tests/list-adrs.e2e.test.ts +23 -18
- package/tests/new-adr.e2e.test.ts +15 -12
- package/tests/superseding-records.e2e.test.ts +16 -11
- package/tests/toc-prefixing.e2e.test.ts +15 -11
- package/tests/use-template-override.e2e.test.ts +18 -10
- package/tests/work-form-other-directories.e2e.test.ts +14 -12
- package/tsconfig.json +9 -8
- package/vitest.config.e2e.ts +13 -0
- package/vitest.config.ts +8 -1
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -23
- package/.github/dependabot.yml +0 -14
- package/.github/workflows/auto-merge.yml +0 -14
- package/doc/adr/0001-record-architecture-decisions.md +0 -21
- package/doc/adr/0002-using-heavy-e2e-tests.md +0 -20
- /package/src/{environment.d.ts → types/environment.d.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
dir: 'tests',
|
|
6
|
+
testTimeout: 10000,
|
|
7
|
+
watch: false,
|
|
8
|
+
coverage: {
|
|
9
|
+
reportsDirectory: './reports/coverage/e2e',
|
|
10
|
+
reporter: ['text', 'json', 'html']
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
package/vitest.config.ts
CHANGED
|
@@ -2,10 +2,17 @@ import { defineConfig } from 'vitest/config';
|
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
test: {
|
|
5
|
+
dir: 'src',
|
|
5
6
|
testTimeout: 10000,
|
|
6
7
|
watch: false,
|
|
8
|
+
poolOptions: {
|
|
9
|
+
forks: {
|
|
10
|
+
singleFork: true,
|
|
11
|
+
isolate: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
coverage: {
|
|
8
|
-
reportsDirectory: './reports/coverage',
|
|
15
|
+
reportsDirectory: './reports/coverage/unit',
|
|
9
16
|
reporter: ['text', 'json', 'html']
|
|
10
17
|
}
|
|
11
18
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"tailored-tunes",
|
|
4
|
-
"plugin:json/recommended",
|
|
5
|
-
"plugin:security/recommended"
|
|
6
|
-
],
|
|
7
|
-
"root": true,
|
|
8
|
-
"parser": "@typescript-eslint/parser",
|
|
9
|
-
"plugins": [
|
|
10
|
-
"json",
|
|
11
|
-
"@typescript-eslint"
|
|
12
|
-
],
|
|
13
|
-
"rules": {
|
|
14
|
-
"no-console": "off",
|
|
15
|
-
"security/detect-object-injection": 0,
|
|
16
|
-
"security/detect-non-literal-fs-filename": 0
|
|
17
|
-
},
|
|
18
|
-
"env": {
|
|
19
|
-
"commonjs": false,
|
|
20
|
-
"es6": true,
|
|
21
|
-
"node": true
|
|
22
|
-
}
|
|
23
|
-
}
|
package/.github/dependabot.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
-
directory: "/" # Location of package manifests
|
|
10
|
-
versioning-strategy: increase-if-necessary
|
|
11
|
-
commit-message:
|
|
12
|
-
prefix: "chore: "
|
|
13
|
-
schedule:
|
|
14
|
-
interval: "daily"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
name: auto-merge dependabot
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
auto-merge:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v2
|
|
11
|
-
- uses: ahmadnassri/action-dependabot-auto-merge@v2
|
|
12
|
-
with:
|
|
13
|
-
target: minor # includes patch updates!
|
|
14
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# 1. Record architecture decisions
|
|
2
|
-
|
|
3
|
-
Date: 2022-06-22
|
|
4
|
-
|
|
5
|
-
## Status
|
|
6
|
-
|
|
7
|
-
Accepted
|
|
8
|
-
|
|
9
|
-
## Context
|
|
10
|
-
|
|
11
|
-
We need to record the architectural decisions made on this project.
|
|
12
|
-
|
|
13
|
-
## Decision
|
|
14
|
-
|
|
15
|
-
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
|
|
16
|
-
|
|
17
|
-
## Consequences
|
|
18
|
-
|
|
19
|
-
See Michael Nygard's article, linked above.
|
|
20
|
-
For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).
|
|
21
|
-
> For a node version of the same tooling, see Meza's [adr-tools](https://github.com/meza/adr-tools).
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# 2. Using Heavy E2E Tests
|
|
2
|
-
|
|
3
|
-
Date: 2022-06-22
|
|
4
|
-
|
|
5
|
-
## Status
|
|
6
|
-
|
|
7
|
-
Accepted
|
|
8
|
-
|
|
9
|
-
## Context
|
|
10
|
-
|
|
11
|
-
The original tool has an [exhaustive test suite](https://github.com/npryce/adr-tools/tree/master/tests) that allows us to make sure that we're backwards compatible.
|
|
12
|
-
|
|
13
|
-
## Decision
|
|
14
|
-
|
|
15
|
-
We'll be re-implementing those tests for ourselves too. This means that we will be using the original examples,
|
|
16
|
-
expectations and the ethos of invoking the tool with the given examples.
|
|
17
|
-
|
|
18
|
-
## Consequences
|
|
19
|
-
|
|
20
|
-
The E2E test suite will be very slow to run and it can only be executed sequentially.
|
|
File without changes
|