@wix/origami-lint 1.34.15 → 1.34.17

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.
Files changed (2) hide show
  1. package/dist/lint.js +15 -11
  2. package/package.json +4 -4
package/dist/lint.js CHANGED
@@ -1,18 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import { sendAndExit } from '@wix/origami-bi';
2
+ import { createWorkspaceRun, sendAndExit } from '@wix/origami-bi';
3
+ import { readFileSync } from 'node:fs';
3
4
  // Origami lint: runs the project rules on the site's own files, then lints the pages whose files changed since the last
4
5
  // passing run. See lint/README.md.
5
6
  import { getChangedFiles, markPassing } from "./history/index.js";
6
7
  import { runRules } from "./rules-adapter/index.js";
7
8
  import { findPagesToLint } from "./page-model/index.js";
8
9
  import { runProjectRules } from "./project-rules-runner/index.js";
9
- import { checkStartedAtSiteRoot } from "./shared/paths.js";
10
- await checkStartedAtSiteRoot();
11
- const changedFiles = getChangedFiles();
12
- const projectPassed = runProjectRules(changedFiles.all);
13
- const pagesToLint = findPagesToLint(changedFiles);
14
- const pagesPassed = runRules(pagesToLint);
15
- const passed = projectPassed && pagesPassed;
16
- if (passed)
17
- markPassing(changedFiles);
18
- await sendAndExit(passed ? 0 : 1);
10
+ import { checkStartedAtSiteRoot, LINT_PACKAGE_FILE } from "./shared/paths.js";
11
+ const run = createWorkspaceRun({ command: 'yarn lint', toolVersion: JSON.parse(readFileSync(LINT_PACKAGE_FILE, 'utf8')).version });
12
+ await run.trackCommand(async () => {
13
+ await checkStartedAtSiteRoot();
14
+ const changedFiles = getChangedFiles();
15
+ const projectPassed = runProjectRules(changedFiles.all);
16
+ const pagesToLint = findPagesToLint(changedFiles);
17
+ const pagesPassed = runRules(pagesToLint);
18
+ const passed = projectPassed && pagesPassed;
19
+ if (passed)
20
+ markPassing(changedFiles);
21
+ await sendAndExit(passed ? 0 : 1);
22
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/origami-lint",
3
- "version": "1.34.15",
3
+ "version": "1.34.17",
4
4
  "description": "Offline lint for an exported Origami site: lints the pages that changed since the last passing run",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,11 +21,11 @@
21
21
  "test": "node --test 'test/*.test.ts'"
22
22
  },
23
23
  "dependencies": {
24
- "@wix/origami-fonts": "1.0.3",
24
+ "@wix/origami-fonts": "1.0.4",
25
25
  "oxc-parser": "^0.151.0",
26
26
  "oxlint": "^1.39.0",
27
27
  "postcss": "^8.5.3",
28
- "@wix/origami-bi": "0.5.0"
28
+ "@wix/origami-bi": "0.6.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",
@@ -52,5 +52,5 @@
52
52
  ]
53
53
  }
54
54
  },
55
- "falconPackageHash": "4309c8c2750b03adbb24c3f4842278427ed5d52445a4fe72eff16b4c"
55
+ "falconPackageHash": "0d8ae1fbf9f13971b01e3327b341f95e28d59c6dff47b785d1aae3d0"
56
56
  }