@webpieces/dev-config 0.2.60 → 0.2.62

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/executors.json CHANGED
@@ -54,6 +54,11 @@
54
54
  "implementation": "./executors/validate-versions-locked/executor",
55
55
  "schema": "./executors/validate-versions-locked/schema.json",
56
56
  "description": "Validate package.json versions are locked (no semver ranges) and npm ci compatible"
57
+ },
58
+ "validate-modified-files": {
59
+ "implementation": "./architecture/executors/validate-modified-files/executor",
60
+ "schema": "./architecture/executors/validate-modified-files/schema.json",
61
+ "description": "Validate modified files don't exceed max line count"
57
62
  }
58
63
  }
59
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpieces/dev-config",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "description": "Development configuration, scripts, and patterns for WebPieces projects",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/plugin.js CHANGED
@@ -37,9 +37,11 @@ const DEFAULT_OPTIONS = {
37
37
  validatePackageJson: true,
38
38
  validateNewMethods: true,
39
39
  validateModifiedMethods: true,
40
+ validateModifiedFiles: true,
40
41
  validateVersionsLocked: true,
41
42
  newMethodsMaxLines: 30,
42
43
  modifiedAndNewMethodsMaxLines: 80,
44
+ modifiedFilesMaxLines: 900,
43
45
  },
44
46
  features: {
45
47
  generate: true,
@@ -157,6 +159,8 @@ function buildValidationTargetsList(validations) {
157
159
  targets.push('validate-new-methods');
158
160
  if (validations.validateModifiedMethods)
159
161
  targets.push('validate-modified-methods');
162
+ if (validations.validateModifiedFiles)
163
+ targets.push('validate-modified-files');
160
164
  if (validations.validateVersionsLocked)
161
165
  targets.push('validate-versions-locked');
162
166
  return targets;
@@ -195,6 +199,9 @@ function createWorkspaceTargetsWithoutPrefix(opts) {
195
199
  if (validations.validateModifiedMethods) {
196
200
  targets['validate-modified-methods'] = createValidateModifiedMethodsTarget(validations.modifiedAndNewMethodsMaxLines);
197
201
  }
202
+ if (validations.validateModifiedFiles) {
203
+ targets['validate-modified-files'] = createValidateModifiedFilesTarget(validations.modifiedFilesMaxLines);
204
+ }
198
205
  if (validations.validateVersionsLocked) {
199
206
  targets['validate-versions-locked'] = createValidateVersionsLockedTarget();
200
207
  }
@@ -239,6 +246,9 @@ function createWorkspaceTargets(opts) {
239
246
  if (opts.workspace.validations.validateModifiedMethods) {
240
247
  targets[`${prefix}validate-modified-methods`] = createValidateModifiedMethodsTarget(opts.workspace.validations.modifiedAndNewMethodsMaxLines);
241
248
  }
249
+ if (opts.workspace.validations.validateModifiedFiles) {
250
+ targets[`${prefix}validate-modified-files`] = createValidateModifiedFilesTarget(opts.workspace.validations.modifiedFilesMaxLines);
251
+ }
242
252
  return targets;
243
253
  }
244
254
  function createGenerateTarget(graphPath) {
@@ -345,6 +355,18 @@ function createValidateModifiedMethodsTarget(maxLines) {
345
355
  },
346
356
  };
347
357
  }
358
+ function createValidateModifiedFilesTarget(maxLines) {
359
+ return {
360
+ executor: '@webpieces/dev-config:validate-modified-files',
361
+ cache: false, // Don't cache - depends on git state
362
+ inputs: ['default'],
363
+ options: { max: maxLines },
364
+ metadata: {
365
+ technologies: ['nx'],
366
+ description: `Validate modified files do not exceed ${maxLines} lines (encourages keeping files small)`,
367
+ },
368
+ };
369
+ }
348
370
  function createValidateVersionsLockedTarget() {
349
371
  return {
350
372
  executor: '@webpieces/dev-config:validate-versions-locked',