@nojaja/greputil 1.0.0 → 1.0.1
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/.babelrc +6 -6
- package/.dependency-cruiser.js +89 -89
- package/.eslintignore +6 -6
- package/.eslintrc.cjs +48 -48
- package/.github/skills/completion-mandatory-quality-gates.md +26 -26
- package/.github/skills/nodejs-project-quality-guardrails.md +417 -417
- package/.github/workflows/release.yml +43 -43
- package/.github/workflows/webpack.yml +27 -27
- package/LICENSE +21 -21
- package/README.md +335 -335
- package/jest.config.js +16 -16
- package/jest.unit.config.js +31 -31
- package/package.json +2 -2
- package/src/BufferPatternMatcher.ts +61 -61
- package/src/RegExpArray.ts +209 -209
- package/src/index.ts +15 -15
- package/tests/unit/RegExpArray.spec.ts +205 -205
- package/tsconfig.json +22 -22
- package/typedoc.js +16 -16
- package/webpack.config.js +31 -31
- package/MIGRATION_REPORT.md +0 -77
package/.babelrc
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"test": {
|
|
4
|
-
"plugins": ["transform-es2015-modules-commonjs"]
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"test": {
|
|
4
|
+
"plugins": ["transform-es2015-modules-commonjs"]
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
7
|
}
|
package/.dependency-cruiser.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
forbidden: [
|
|
3
|
-
{
|
|
4
|
-
name: 'no-circular',
|
|
5
|
-
severity: 'error',
|
|
6
|
-
comment: '循環依存を禁止',
|
|
7
|
-
from: {},
|
|
8
|
-
to: {
|
|
9
|
-
circular: true
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'no-orphans',
|
|
14
|
-
severity: 'warn',
|
|
15
|
-
comment: '未使用ファイルを警告',
|
|
16
|
-
from: {
|
|
17
|
-
orphan: true,
|
|
18
|
-
pathNot: [
|
|
19
|
-
'(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$',
|
|
20
|
-
'\\.d\\.ts$',
|
|
21
|
-
'(^|/)tsconfig\\.json$',
|
|
22
|
-
'(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$'
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
to: {}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'no-deprecated-core',
|
|
29
|
-
comment: '非推奨のNode.js coreモジュールを禁止',
|
|
30
|
-
severity: 'warn',
|
|
31
|
-
from: {},
|
|
32
|
-
to: {
|
|
33
|
-
dependencyTypes: [
|
|
34
|
-
'core'
|
|
35
|
-
],
|
|
36
|
-
path: [
|
|
37
|
-
'^(punycode|domain|constants|sys|_linklist)$'
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'not-to-deprecated',
|
|
43
|
-
comment: '非推奨のnpmモジュールを禁止',
|
|
44
|
-
severity: 'warn',
|
|
45
|
-
from: {},
|
|
46
|
-
to: {
|
|
47
|
-
dependencyTypes: [
|
|
48
|
-
'deprecated'
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'no-non-package-json',
|
|
54
|
-
severity: 'error',
|
|
55
|
-
comment: 'package.jsonに記載されていない依存を禁止',
|
|
56
|
-
from: {},
|
|
57
|
-
to: {
|
|
58
|
-
dependencyTypes: [
|
|
59
|
-
'npm-no-pkg',
|
|
60
|
-
'npm-unknown'
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
options: {
|
|
66
|
-
doNotFollow: {
|
|
67
|
-
path: 'node_modules'
|
|
68
|
-
},
|
|
69
|
-
tsPreCompilationDeps: true,
|
|
70
|
-
tsConfig: {
|
|
71
|
-
fileName: './tsconfig.json'
|
|
72
|
-
},
|
|
73
|
-
enhancedResolveOptions: {
|
|
74
|
-
exportsFields: ['exports'],
|
|
75
|
-
conditionNames: ['import', 'require', 'node', 'default']
|
|
76
|
-
},
|
|
77
|
-
reporterOptions: {
|
|
78
|
-
dot: {
|
|
79
|
-
collapsePattern: 'node_modules/[^/]+'
|
|
80
|
-
},
|
|
81
|
-
archi: {
|
|
82
|
-
collapsePattern: '^(node_modules|packages|src|lib|app|bin|test|spec)/[^/]+'
|
|
83
|
-
},
|
|
84
|
-
text: {
|
|
85
|
-
highlightFocused: true
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
forbidden: [
|
|
3
|
+
{
|
|
4
|
+
name: 'no-circular',
|
|
5
|
+
severity: 'error',
|
|
6
|
+
comment: '循環依存を禁止',
|
|
7
|
+
from: {},
|
|
8
|
+
to: {
|
|
9
|
+
circular: true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'no-orphans',
|
|
14
|
+
severity: 'warn',
|
|
15
|
+
comment: '未使用ファイルを警告',
|
|
16
|
+
from: {
|
|
17
|
+
orphan: true,
|
|
18
|
+
pathNot: [
|
|
19
|
+
'(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$',
|
|
20
|
+
'\\.d\\.ts$',
|
|
21
|
+
'(^|/)tsconfig\\.json$',
|
|
22
|
+
'(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$'
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
to: {}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'no-deprecated-core',
|
|
29
|
+
comment: '非推奨のNode.js coreモジュールを禁止',
|
|
30
|
+
severity: 'warn',
|
|
31
|
+
from: {},
|
|
32
|
+
to: {
|
|
33
|
+
dependencyTypes: [
|
|
34
|
+
'core'
|
|
35
|
+
],
|
|
36
|
+
path: [
|
|
37
|
+
'^(punycode|domain|constants|sys|_linklist)$'
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'not-to-deprecated',
|
|
43
|
+
comment: '非推奨のnpmモジュールを禁止',
|
|
44
|
+
severity: 'warn',
|
|
45
|
+
from: {},
|
|
46
|
+
to: {
|
|
47
|
+
dependencyTypes: [
|
|
48
|
+
'deprecated'
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'no-non-package-json',
|
|
54
|
+
severity: 'error',
|
|
55
|
+
comment: 'package.jsonに記載されていない依存を禁止',
|
|
56
|
+
from: {},
|
|
57
|
+
to: {
|
|
58
|
+
dependencyTypes: [
|
|
59
|
+
'npm-no-pkg',
|
|
60
|
+
'npm-unknown'
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
options: {
|
|
66
|
+
doNotFollow: {
|
|
67
|
+
path: 'node_modules'
|
|
68
|
+
},
|
|
69
|
+
tsPreCompilationDeps: true,
|
|
70
|
+
tsConfig: {
|
|
71
|
+
fileName: './tsconfig.json'
|
|
72
|
+
},
|
|
73
|
+
enhancedResolveOptions: {
|
|
74
|
+
exportsFields: ['exports'],
|
|
75
|
+
conditionNames: ['import', 'require', 'node', 'default']
|
|
76
|
+
},
|
|
77
|
+
reporterOptions: {
|
|
78
|
+
dot: {
|
|
79
|
+
collapsePattern: 'node_modules/[^/]+'
|
|
80
|
+
},
|
|
81
|
+
archi: {
|
|
82
|
+
collapsePattern: '^(node_modules|packages|src|lib|app|bin|test|spec)/[^/]+'
|
|
83
|
+
},
|
|
84
|
+
text: {
|
|
85
|
+
highlightFocused: true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
package/.eslintignore
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
node_modules/
|
|
2
|
-
dist/
|
|
3
|
-
coverage/
|
|
4
|
-
*.js
|
|
5
|
-
tests/
|
|
6
|
-
!.eslintrc.cjs
|
|
1
|
+
node_modules/
|
|
2
|
+
dist/
|
|
3
|
+
coverage/
|
|
4
|
+
*.js
|
|
5
|
+
tests/
|
|
6
|
+
!.eslintrc.cjs
|
package/.eslintrc.cjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
parser: '@typescript-eslint/parser',
|
|
4
|
-
parserOptions: {
|
|
5
|
-
ecmaVersion: 2022,
|
|
6
|
-
sourceType: 'module',
|
|
7
|
-
project: './tsconfig.json'
|
|
8
|
-
},
|
|
9
|
-
plugins: ['@typescript-eslint', 'sonarjs', 'jsdoc'],
|
|
10
|
-
extends: [
|
|
11
|
-
'eslint:recommended',
|
|
12
|
-
'plugin:@typescript-eslint/recommended',
|
|
13
|
-
'plugin:sonarjs/recommended',
|
|
14
|
-
'plugin:jsdoc/recommended'
|
|
15
|
-
],
|
|
16
|
-
rules: {
|
|
17
|
-
'sonarjs/cognitive-complexity': ['error', 10],
|
|
18
|
-
'@typescript-eslint/no-unused-vars': ['warn'],
|
|
19
|
-
'@typescript-eslint/no-explicit-any': ['error'],
|
|
20
|
-
'jsdoc/require-jsdoc': [
|
|
21
|
-
'error',
|
|
22
|
-
{
|
|
23
|
-
require: {
|
|
24
|
-
FunctionDeclaration: true,
|
|
25
|
-
MethodDefinition: true,
|
|
26
|
-
ClassDeclaration: true,
|
|
27
|
-
ArrowFunctionExpression: false,
|
|
28
|
-
FunctionExpression: true
|
|
29
|
-
},
|
|
30
|
-
contexts: [
|
|
31
|
-
'TSInterfaceDeclaration',
|
|
32
|
-
'TSTypeAliasDeclaration'
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
'jsdoc/require-param': 'error',
|
|
37
|
-
'jsdoc/require-returns': 'error',
|
|
38
|
-
'jsdoc/require-param-type': 'off',
|
|
39
|
-
'jsdoc/require-returns-type': 'off',
|
|
40
|
-
'jsdoc/check-tag-names': ['error', {
|
|
41
|
-
definedTags: ['処理名', '処理概要', '実装理由']
|
|
42
|
-
}]
|
|
43
|
-
},
|
|
44
|
-
env: {
|
|
45
|
-
node: true,
|
|
46
|
-
es2022: true
|
|
47
|
-
}
|
|
48
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
parserOptions: {
|
|
5
|
+
ecmaVersion: 2022,
|
|
6
|
+
sourceType: 'module',
|
|
7
|
+
project: './tsconfig.json'
|
|
8
|
+
},
|
|
9
|
+
plugins: ['@typescript-eslint', 'sonarjs', 'jsdoc'],
|
|
10
|
+
extends: [
|
|
11
|
+
'eslint:recommended',
|
|
12
|
+
'plugin:@typescript-eslint/recommended',
|
|
13
|
+
'plugin:sonarjs/recommended',
|
|
14
|
+
'plugin:jsdoc/recommended'
|
|
15
|
+
],
|
|
16
|
+
rules: {
|
|
17
|
+
'sonarjs/cognitive-complexity': ['error', 10],
|
|
18
|
+
'@typescript-eslint/no-unused-vars': ['warn'],
|
|
19
|
+
'@typescript-eslint/no-explicit-any': ['error'],
|
|
20
|
+
'jsdoc/require-jsdoc': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
require: {
|
|
24
|
+
FunctionDeclaration: true,
|
|
25
|
+
MethodDefinition: true,
|
|
26
|
+
ClassDeclaration: true,
|
|
27
|
+
ArrowFunctionExpression: false,
|
|
28
|
+
FunctionExpression: true
|
|
29
|
+
},
|
|
30
|
+
contexts: [
|
|
31
|
+
'TSInterfaceDeclaration',
|
|
32
|
+
'TSTypeAliasDeclaration'
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
'jsdoc/require-param': 'error',
|
|
37
|
+
'jsdoc/require-returns': 'error',
|
|
38
|
+
'jsdoc/require-param-type': 'off',
|
|
39
|
+
'jsdoc/require-returns-type': 'off',
|
|
40
|
+
'jsdoc/check-tag-names': ['error', {
|
|
41
|
+
definedTags: ['処理名', '処理概要', '実装理由']
|
|
42
|
+
}]
|
|
43
|
+
},
|
|
44
|
+
env: {
|
|
45
|
+
node: true,
|
|
46
|
+
es2022: true
|
|
47
|
+
}
|
|
48
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: completion-mandatory-quality-gates
|
|
3
|
-
description: 作業完了時に必ず品質ゲートを全通過させるためのSkill。ビルド・依存関係チェック・テスト・Lintを例外なく実行し、設定変更や除外を禁止する。
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Agent Skills format (agentskills.io) および GitHub Copilot / Claude / Codex に対応
|
|
6
|
-
metadata:
|
|
7
|
-
author: nojaja
|
|
8
|
-
version: "1.0.0"
|
|
9
|
-
allowed-tools: Read Write Bash
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# 作業完了時の強制品質ゲート Skill
|
|
13
|
-
|
|
14
|
-
本Skillは、作業完了タイミングで必ず以下の品質ゲートを**設定変更・除外なし**で実行し、全て成功させることをエージェントに強制します。いずれかをスキップ・省略・設定変更することを禁止します。
|
|
15
|
-
|
|
16
|
-
## 必須実行コマンド(順不同可、全て成功が条件)
|
|
17
|
-
- `npm run build`
|
|
18
|
-
- `npm run depcruise`
|
|
19
|
-
- `npm run test`
|
|
20
|
-
- `npm run lint`
|
|
21
|
-
|
|
22
|
-
## 運用ルール
|
|
23
|
-
- 各ゲートの設定を変更してはならない(閾値・対象・オプションの調整禁止)。
|
|
24
|
-
- いかなる理由でも実行対象からの除外・スキップを禁止する。
|
|
25
|
-
- 実行結果は成功が確認できるまで対応を継続し、失敗時は設定を変えずに修正して再実行する。
|
|
26
|
-
- 作業完了の宣言は、上記4コマンドが全て成功した後のみ行うこと。
|
|
1
|
+
---
|
|
2
|
+
name: completion-mandatory-quality-gates
|
|
3
|
+
description: 作業完了時に必ず品質ゲートを全通過させるためのSkill。ビルド・依存関係チェック・テスト・Lintを例外なく実行し、設定変更や除外を禁止する。
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Agent Skills format (agentskills.io) および GitHub Copilot / Claude / Codex に対応
|
|
6
|
+
metadata:
|
|
7
|
+
author: nojaja
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
allowed-tools: Read Write Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 作業完了時の強制品質ゲート Skill
|
|
13
|
+
|
|
14
|
+
本Skillは、作業完了タイミングで必ず以下の品質ゲートを**設定変更・除外なし**で実行し、全て成功させることをエージェントに強制します。いずれかをスキップ・省略・設定変更することを禁止します。
|
|
15
|
+
|
|
16
|
+
## 必須実行コマンド(順不同可、全て成功が条件)
|
|
17
|
+
- `npm run build`
|
|
18
|
+
- `npm run depcruise`
|
|
19
|
+
- `npm run test`
|
|
20
|
+
- `npm run lint`
|
|
21
|
+
|
|
22
|
+
## 運用ルール
|
|
23
|
+
- 各ゲートの設定を変更してはならない(閾値・対象・オプションの調整禁止)。
|
|
24
|
+
- いかなる理由でも実行対象からの除外・スキップを禁止する。
|
|
25
|
+
- 実行結果は成功が確認できるまで対応を継続し、失敗時は設定を変えずに修正して再実行する。
|
|
26
|
+
- 作業完了の宣言は、上記4コマンドが全て成功した後のみ行うこと。
|