sfdx-git-delta 5.26.2 → 5.28.0
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/CHANGELOG.md +14 -0
- package/README.md +13 -1
- package/lib/metadata/a48.json +7 -0
- package/lib/metadata/v47.json +7 -0
- package/lib/metadata/v49.json +7 -0
- package/lib/metadata/v50.json +7 -0
- package/lib/metadata/v51.json +7 -0
- package/lib/metadata/v52.json +7 -0
- package/lib/metadata/v53.json +7 -0
- package/lib/metadata/v54.json +7 -0
- package/lib/metadata/v55.json +7 -0
- package/lib/metadata/v56.json +7 -0
- package/lib/metadata/v57.json +7 -0
- package/lib/metadata/v58.json +7 -0
- package/lib/metadata/v59.json +7 -0
- package/lib/utils/fsHelper.js +6 -1
- package/lib/utils/fsHelper.js.map +1 -1
- package/lib/utils/gitLfsHelper.d.ts +3 -0
- package/lib/utils/gitLfsHelper.js +23 -0
- package/lib/utils/gitLfsHelper.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
6
6
|
|
|
7
|
+
## [5.28.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.27.0...v5.28.0) (2023-11-07)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add `DocumentType` metadata support ([#720](https://github.com/scolladon/sfdx-git-delta/issues/720)) ([218065a](https://github.com/scolladon/sfdx-git-delta/commit/218065aca9df13f513e0e4d4688759dbbf2e90de))
|
|
13
|
+
|
|
14
|
+
## [5.27.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.26.2...v5.27.0) (2023-10-17)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* support `git-lfs` ([#707](https://github.com/scolladon/sfdx-git-delta/issues/707)) ([b27abc8](https://github.com/scolladon/sfdx-git-delta/commit/b27abc8276cc7c91dbe204dae0fe7aee543f3830))
|
|
20
|
+
|
|
7
21
|
## [5.26.2](https://github.com/scolladon/sfdx-git-delta/compare/v5.26.1...v5.26.2) (2023-10-09)
|
|
8
22
|
|
|
9
23
|
|
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
- [`sfdx sgd:source:delta -f <string> [-t <string>] [-r <filepath>] [-i <filepath>] [-D <filepath>] [-s <filepath>] [-W] [-o <filepath>] [-a <number>] [-d] [-n <filepath>] [-N <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-sgdsourcedelta--f-string--t-string--r-filepath--i-filepath--d-filepath--s-filepath--w--o-filepath--a-number--d--n-filepath--n-filepath---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
36
36
|
- [Windows users](#windows-users)
|
|
37
37
|
- [CI/CD specificity](#cicd-specificity)
|
|
38
|
+
- [Git LFS support](#git-lfs-support)
|
|
38
39
|
- [Use cases](#use-cases)
|
|
39
40
|
- [Walkthrough](#walkthrough)
|
|
40
41
|
- [Execute sgd](#execute-sgd)
|
|
@@ -187,7 +188,7 @@ OPTIONS
|
|
|
187
188
|
this command invocation
|
|
188
189
|
```
|
|
189
190
|
|
|
190
|
-
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v5.
|
|
191
|
+
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v5.28.0/src/commands/sgd/source/delta.ts)_
|
|
191
192
|
<!-- commandsstop -->
|
|
192
193
|
|
|
193
194
|
### Windows users
|
|
@@ -232,10 +233,21 @@ Example with [github action](https://docs.github.com/en/actions/learn-github-act
|
|
|
232
233
|
run: echo y | sfdx plugins:install "sfdx-git-delta@${{ vars.SGD_VERSION }}"
|
|
233
234
|
```
|
|
234
235
|
|
|
236
|
+
### Git LFS support
|
|
237
|
+
|
|
238
|
+
The plugin is compatible with git LFS.
|
|
239
|
+
It will be able to read content from LFS locally.
|
|
240
|
+
It is the user responsibility to ensure LFS content is present when the plugin is executed.
|
|
241
|
+
/!\ The plugin **will not fetch** content from the LFS server /!\
|
|
242
|
+
|
|
235
243
|
### Use cases
|
|
236
244
|
|
|
237
245
|
Any git sha pointer is supported: commit sha, branch, tag, git expression (HEAD, etc.).
|
|
238
246
|
|
|
247
|
+
`--from` parameter is the base commit (the first, the oldest, the closest)
|
|
248
|
+
`--to` parameter is the target commit (the last, the youngest, the farthest)
|
|
249
|
+
If you want to deploy incrementally the content of a PR, `--from` parameter will be the base branch the PR branch wants to merge to, and `--to` parameter will be the PR branch.
|
|
250
|
+
|
|
239
251
|
Here are examples of how to compare the content of different branches:
|
|
240
252
|
|
|
241
253
|
- **Comparing between commits in different branches**
|
package/lib/metadata/a48.json
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
"suffix": "apt",
|
|
7
7
|
"xmlName": "ActionPlanTemplate"
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
"directoryName": "documentTypes",
|
|
11
|
+
"inFolder": false,
|
|
12
|
+
"metaFile": false,
|
|
13
|
+
"suffix": "documentType",
|
|
14
|
+
"xmlName": "DocumentType"
|
|
15
|
+
},
|
|
9
16
|
{
|
|
10
17
|
"directoryName": "recommendationStrategies",
|
|
11
18
|
"inFolder": false,
|
package/lib/metadata/v47.json
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
"suffix": "apt",
|
|
7
7
|
"xmlName": "ActionPlanTemplate"
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
"directoryName": "documentTypes",
|
|
11
|
+
"inFolder": false,
|
|
12
|
+
"metaFile": false,
|
|
13
|
+
"suffix": "documentType",
|
|
14
|
+
"xmlName": "DocumentType"
|
|
15
|
+
},
|
|
9
16
|
{
|
|
10
17
|
"directoryName": "recommendationStrategies",
|
|
11
18
|
"inFolder": false,
|
package/lib/metadata/v49.json
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
"suffix": "apt",
|
|
7
7
|
"xmlName": "ActionPlanTemplate"
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
"directoryName": "documentTypes",
|
|
11
|
+
"inFolder": false,
|
|
12
|
+
"metaFile": false,
|
|
13
|
+
"suffix": "documentType",
|
|
14
|
+
"xmlName": "DocumentType"
|
|
15
|
+
},
|
|
9
16
|
{
|
|
10
17
|
"directoryName": "recommendationStrategies",
|
|
11
18
|
"inFolder": false,
|
package/lib/metadata/v50.json
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
"suffix": "apt",
|
|
7
7
|
"xmlName": "ActionPlanTemplate"
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
"directoryName": "documentTypes",
|
|
11
|
+
"inFolder": false,
|
|
12
|
+
"metaFile": false,
|
|
13
|
+
"suffix": "documentType",
|
|
14
|
+
"xmlName": "DocumentType"
|
|
15
|
+
},
|
|
9
16
|
{
|
|
10
17
|
"directoryName": "recommendationStrategies",
|
|
11
18
|
"inFolder": false,
|
package/lib/metadata/v51.json
CHANGED
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
"suffix": "apt",
|
|
21
21
|
"xmlName": "ActionPlanTemplate"
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"directoryName": "documentTypes",
|
|
25
|
+
"inFolder": false,
|
|
26
|
+
"metaFile": false,
|
|
27
|
+
"suffix": "documentType",
|
|
28
|
+
"xmlName": "DocumentType"
|
|
29
|
+
},
|
|
23
30
|
{
|
|
24
31
|
"directoryName": "recommendationStrategies",
|
|
25
32
|
"inFolder": false,
|
package/lib/metadata/v52.json
CHANGED
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
"suffix": "apt",
|
|
21
21
|
"xmlName": "ActionPlanTemplate"
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"directoryName": "documentTypes",
|
|
25
|
+
"inFolder": false,
|
|
26
|
+
"metaFile": false,
|
|
27
|
+
"suffix": "documentType",
|
|
28
|
+
"xmlName": "DocumentType"
|
|
29
|
+
},
|
|
23
30
|
{
|
|
24
31
|
"directoryName": "recommendationStrategies",
|
|
25
32
|
"inFolder": false,
|
package/lib/metadata/v53.json
CHANGED
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
"suffix": "apt",
|
|
21
21
|
"xmlName": "ActionPlanTemplate"
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"directoryName": "documentTypes",
|
|
25
|
+
"inFolder": false,
|
|
26
|
+
"metaFile": false,
|
|
27
|
+
"suffix": "documentType",
|
|
28
|
+
"xmlName": "DocumentType"
|
|
29
|
+
},
|
|
23
30
|
{
|
|
24
31
|
"directoryName": "recommendationStrategies",
|
|
25
32
|
"inFolder": false,
|
package/lib/metadata/v54.json
CHANGED
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
"suffix": "apt",
|
|
49
49
|
"xmlName": "ActionPlanTemplate"
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
"directoryName": "documentTypes",
|
|
53
|
+
"inFolder": false,
|
|
54
|
+
"metaFile": false,
|
|
55
|
+
"suffix": "documentType",
|
|
56
|
+
"xmlName": "DocumentType"
|
|
57
|
+
},
|
|
51
58
|
{
|
|
52
59
|
"directoryName": "recommendationStrategies",
|
|
53
60
|
"inFolder": false,
|
package/lib/metadata/v55.json
CHANGED
|
@@ -118,6 +118,13 @@
|
|
|
118
118
|
"suffix": "apt",
|
|
119
119
|
"xmlName": "ActionPlanTemplate"
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
"directoryName": "documentTypes",
|
|
123
|
+
"inFolder": false,
|
|
124
|
+
"metaFile": false,
|
|
125
|
+
"suffix": "documentType",
|
|
126
|
+
"xmlName": "DocumentType"
|
|
127
|
+
},
|
|
121
128
|
{
|
|
122
129
|
"directoryName": "recommendationStrategies",
|
|
123
130
|
"inFolder": false,
|
package/lib/metadata/v56.json
CHANGED
|
@@ -118,6 +118,13 @@
|
|
|
118
118
|
"suffix": "apt",
|
|
119
119
|
"xmlName": "ActionPlanTemplate"
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
"directoryName": "documentTypes",
|
|
123
|
+
"inFolder": false,
|
|
124
|
+
"metaFile": false,
|
|
125
|
+
"suffix": "documentType",
|
|
126
|
+
"xmlName": "DocumentType"
|
|
127
|
+
},
|
|
121
128
|
{
|
|
122
129
|
"directoryName": "recommendationStrategies",
|
|
123
130
|
"inFolder": false,
|
package/lib/metadata/v57.json
CHANGED
|
@@ -153,6 +153,13 @@
|
|
|
153
153
|
"suffix": "apt",
|
|
154
154
|
"xmlName": "ActionPlanTemplate"
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
"directoryName": "documentTypes",
|
|
158
|
+
"inFolder": false,
|
|
159
|
+
"metaFile": false,
|
|
160
|
+
"suffix": "documentType",
|
|
161
|
+
"xmlName": "DocumentType"
|
|
162
|
+
},
|
|
156
163
|
{
|
|
157
164
|
"directoryName": "recommendationStrategies",
|
|
158
165
|
"inFolder": false,
|
package/lib/metadata/v58.json
CHANGED
|
@@ -153,6 +153,13 @@
|
|
|
153
153
|
"suffix": "apt",
|
|
154
154
|
"xmlName": "ActionPlanTemplate"
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
"directoryName": "documentTypes",
|
|
158
|
+
"inFolder": false,
|
|
159
|
+
"metaFile": false,
|
|
160
|
+
"suffix": "documentType",
|
|
161
|
+
"xmlName": "DocumentType"
|
|
162
|
+
},
|
|
156
163
|
{
|
|
157
164
|
"directoryName": "recommendationStrategies",
|
|
158
165
|
"inFolder": false,
|
package/lib/metadata/v59.json
CHANGED
|
@@ -153,6 +153,13 @@
|
|
|
153
153
|
"suffix": "apt",
|
|
154
154
|
"xmlName": "ActionPlanTemplate"
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
"directoryName": "documentTypes",
|
|
158
|
+
"inFolder": false,
|
|
159
|
+
"metaFile": false,
|
|
160
|
+
"suffix": "documentType",
|
|
161
|
+
"xmlName": "DocumentType"
|
|
162
|
+
},
|
|
156
163
|
{
|
|
157
164
|
"directoryName": "recommendationStrategies",
|
|
158
165
|
"inFolder": false,
|
package/lib/utils/fsHelper.js
CHANGED
|
@@ -6,6 +6,7 @@ const path_1 = require("path");
|
|
|
6
6
|
const fs_extra_2 = require("fs-extra");
|
|
7
7
|
const gitConstants_1 = require("./gitConstants");
|
|
8
8
|
const childProcessUtils_1 = require("./childProcessUtils");
|
|
9
|
+
const gitLfsHelper_1 = require("./gitLfsHelper");
|
|
9
10
|
const FOLDER = 'tree';
|
|
10
11
|
const showCmd = ['--no-pager', 'show'];
|
|
11
12
|
const gitPathSeparatorNormalizer = (path) => path.replace(/\\+/g, gitConstants_1.GIT_PATH_SEP);
|
|
@@ -41,9 +42,13 @@ const copyFiles = async (config, src) => {
|
|
|
41
42
|
exports.copyFiles = copyFiles;
|
|
42
43
|
const readPathFromGitAsBuffer = async (path, { repo, to }) => {
|
|
43
44
|
const normalizedPath = (0, exports.gitPathSeparatorNormalizer)(path);
|
|
44
|
-
|
|
45
|
+
let bufferData = await (0, childProcessUtils_1.getSpawnContent)(gitConstants_1.GIT_COMMAND, [...showCmd, `${to}:${normalizedPath}`], {
|
|
45
46
|
cwd: repo,
|
|
46
47
|
});
|
|
48
|
+
if ((0, gitLfsHelper_1.isLFS)(bufferData)) {
|
|
49
|
+
const lsfPath = (0, gitLfsHelper_1.getLFSObjectContentPath)(bufferData);
|
|
50
|
+
bufferData = await (0, fs_extra_1.readFile)((0, path_1.join)(repo, lsfPath));
|
|
51
|
+
}
|
|
47
52
|
return bufferData;
|
|
48
53
|
};
|
|
49
54
|
const readPathFromGit = async (path, config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsHelper.js","sourceRoot":"","sources":["../../src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getLFSObjectContentPath = exports.isLFS = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const gitConstants_1 = require("./gitConstants");
|
|
6
|
+
const childProcessUtils_1 = require("./childProcessUtils");
|
|
7
|
+
const LFS_HEADER = Buffer.from('version https://git-lfs');
|
|
8
|
+
const isLFS = (content) => content.subarray(0, LFS_HEADER.length).equals(LFS_HEADER);
|
|
9
|
+
exports.isLFS = isLFS;
|
|
10
|
+
const getLFSObjectContentPath = (bufferContent) => {
|
|
11
|
+
const content = bufferContent.toString(gitConstants_1.UTF8_ENCODING);
|
|
12
|
+
const oid = content.split(childProcessUtils_1.EOLRegex)[1].split(':')[1];
|
|
13
|
+
return [
|
|
14
|
+
gitConstants_1.GIT_FOLDER,
|
|
15
|
+
'lfs',
|
|
16
|
+
'objects',
|
|
17
|
+
oid.slice(0, 2),
|
|
18
|
+
oid.slice(2, 4),
|
|
19
|
+
oid,
|
|
20
|
+
].join(path_1.sep);
|
|
21
|
+
};
|
|
22
|
+
exports.getLFSObjectContentPath = getLFSObjectContentPath;
|
|
23
|
+
//# sourceMappingURL=gitLfsHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitLfsHelper.js","sourceRoot":"","sources":["../../src/utils/gitLfsHelper.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;AACZ,+BAA0B;AAC1B,iDAA0D;AAC1D,2DAA8C;AAE9C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA;AAElD,MAAM,KAAK,GAAG,CAAC,OAAe,EAAW,EAAE,CAChD,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAD9C,QAAA,KAAK,SACyC;AAEpD,MAAM,uBAAuB,GAAG,CAAC,aAAqB,EAAU,EAAE;IACvE,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,4BAAa,CAAC,CAAA;IACrD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,4BAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACpD,OAAO;QACL,yBAAU;QACV,KAAK;QACL,SAAS;QACT,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACf,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACf,GAAG;KACJ,CAAC,IAAI,CAAC,UAAG,CAAC,CAAA;AACb,CAAC,CAAA;AAXY,QAAA,uBAAuB,2BAWnC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.28.0","commands":{"sgd:source:delta":{"id":"sgd:source:delta","description":"Generate the sfdx content in source format and destructive change from two git commits","usage":"<%= command.id %> -f <string> [-t <string>] [-r <filepath>] [-i <filepath>] [-D <filepath>] [-s <filepath>] [-W] [-o <filepath>] [-a <number>] [-d] [-n <filepath>] [-N <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"sfdx-git-delta","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"to":{"name":"to","type":"option","char":"t","description":"commit sha to where the diff is done","default":"HEAD"},"from":{"name":"from","type":"option","char":"f","description":"commit sha from where the diff is done","required":true},"repo":{"name":"repo","type":"option","char":"r","description":"git repository location","default":"./"},"ignore":{"name":"ignore","type":"option","char":"i","description":"file listing paths to explicitly ignore for any diff actions"},"ignore-destructive":{"name":"ignore-destructive","type":"option","char":"D","description":"file listing paths to explicitly ignore for any destructive actions"},"source":{"name":"source","type":"option","char":"s","description":"source folder focus location related to --repo","default":"./"},"ignore-whitespace":{"name":"ignore-whitespace","type":"boolean","char":"W","description":"ignore git diff whitespace (space, tab, eol) changes","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"source package specific output","default":"./output"},"api-version":{"name":"api-version","type":"option","char":"a","description":"salesforce metadata API version, default to sfdx-project.json \"sourceApiVersion\" attribute or latest version"},"generate-delta":{"name":"generate-delta","type":"boolean","char":"d","description":"generate delta files in [--output] folder","allowNo":false},"include":{"name":"include","type":"option","char":"n","description":"file listing paths to explicitly include for any diff actions"},"include-destructive":{"name":"include-destructive","type":"option","char":"N","description":"file listing paths to explicitly include for any destructive actions"}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfdx-git-delta",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.0",
|
|
4
4
|
"description": "Generate the sfdx content in source format and destructive change from two git commits",
|
|
5
5
|
"keyword": [
|
|
6
6
|
"salesforce",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@commitlint/config-conventional": "^17.7.0",
|
|
68
68
|
"@jest/globals": "^29.7.0",
|
|
69
69
|
"@oclif/dev-cli": "^1.26.10",
|
|
70
|
-
"@salesforce/cli-plugins-testkit": "^4.4.
|
|
70
|
+
"@salesforce/cli-plugins-testkit": "^4.4.7",
|
|
71
71
|
"@salesforce/dev-config": "^4.0.1",
|
|
72
72
|
"@salesforce/ts-sinon": "^1.4.17",
|
|
73
73
|
"@stryker-mutator/core": "^7.2.0",
|
|
@@ -75,15 +75,15 @@
|
|
|
75
75
|
"@swc/core": "^1.3.81",
|
|
76
76
|
"@types/jest": "^29.5.5",
|
|
77
77
|
"@types/mocha": "^10.0.2",
|
|
78
|
-
"@types/node": "^20.8.
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
|
80
|
-
"@typescript-eslint/parser": "^6.7.
|
|
78
|
+
"@types/node": "^20.8.4",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
80
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
81
81
|
"benchmark": "^2.1.4",
|
|
82
82
|
"chai": "^4.3.10",
|
|
83
83
|
"depcheck": "^1.4.6",
|
|
84
|
-
"eslint": "^8.
|
|
84
|
+
"eslint": "^8.51.0",
|
|
85
85
|
"eslint-config-prettier": "^9.0.0",
|
|
86
|
-
"eslint-plugin-prettier": "^5.0.
|
|
86
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
87
87
|
"husky": "^8.0.3",
|
|
88
88
|
"jest": "^29.7.0",
|
|
89
89
|
"lint-staged": "^14.0.1",
|