Skip to content

Commit

Permalink
simpler changed package detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Aug 14, 2022
1 parent 861ddd6 commit f6d703b
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 563 deletions.
2 changes: 1 addition & 1 deletion packages/n4s/src/exports/compose.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ctx } from 'n4s';
import { invariant, StringObject, assign, mapFirst } from 'vest-utils';

import type { ComposeResult, LazyRuleRunners } from 'genEnforceLazy';
import { ctx } from 'n4s';
import { defaultToPassing, RuleDetailedResult } from 'ruleReturn';
import runLazyRule from 'runLazyRule';

Expand Down
3 changes: 1 addition & 2 deletions packages/n4s/src/exports/compounds.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { enforce } from 'n4s';

import { allOf } from 'allOf';
import { anyOf } from 'anyOf';
import { EnforceCustomMatcher } from 'enforceUtilityTypes';
import { Lazy } from 'genEnforceLazy';
import { enforce } from 'n4s';
import { noneOf } from 'noneOf';
import { oneOf } from 'oneOf';
import { RuleDetailedResult } from 'ruleReturn';
Expand Down
3 changes: 1 addition & 2 deletions packages/n4s/src/exports/schema.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { enforce } from 'n4s';

import { EnforceCustomMatcher } from 'enforceUtilityTypes';
import { isArrayOf } from 'isArrayOf';
import { loose } from 'loose';
import { enforce } from 'n4s';
import { optional } from 'optional';
import { shape } from 'shape';

Expand Down
2 changes: 1 addition & 1 deletion packages/n4s/src/plugins/schema/isArrayOf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ctx } from 'n4s';
import { mapFirst } from 'vest-utils';

import type { LazyRuleRunners } from 'genEnforceLazy';
import { ctx } from 'n4s';
import type { RuleDetailedResult } from 'ruleReturn';
import * as ruleReturn from 'ruleReturn';
import runLazyRule from 'runLazyRule';
Expand Down
1 change: 0 additions & 1 deletion packages/n4s/src/plugins/schema/loose.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ctx } from 'n4s';

import type { RuleDetailedResult } from 'ruleReturn';
import * as ruleReturn from 'ruleReturn';
import runLazyRule from 'runLazyRule';
Expand Down
11 changes: 2 additions & 9 deletions vx/scripts/release/github/listAllChangedPackages.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const path = require('path');

const opts = require('vx/opts');
const packageNames = require('vx/packageNames');
const vxPath = require('vx/vxPath');

const listAllChangesSinceStableBranch = require('./listAllChangesSinceStableBranch');

Expand All @@ -10,12 +8,7 @@ function listAllChangedPackages() {
return Object.keys(
changes.reduce((packages, { files = [] }) => {
return files.reduce((packages, file) => {
if (!file.startsWith(opts.dir.PACKAGES)) {
return packages;
}

const [, packageName] = file.split(path.sep);

const packageName = vxPath.packageNameFromPath(file);
if (!packageNames.names[packageName]) {
return packages;
}
Expand Down

0 comments on commit f6d703b

Please sign in to comment.