@wix/origami-lint 1.34.6 → 1.34.8

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/dist/lint.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { sendAndExit } from '@wix/origami-bi';
2
3
  // Origami lint: runs the project rules on the site's own files, then lints the pages whose files changed since the last
3
4
  // passing run. See lint/README.md.
4
5
  import { getChangedFiles, markPassing } from "./history/index.js";
@@ -6,7 +7,7 @@ import { runRules } from "./rules-adapter/index.js";
6
7
  import { findPagesToLint } from "./page-model/index.js";
7
8
  import { runProjectRules } from "./project-rules-runner/index.js";
8
9
  import { checkStartedAtSiteRoot } from "./shared/paths.js";
9
- checkStartedAtSiteRoot();
10
+ await checkStartedAtSiteRoot();
10
11
  const changedFiles = getChangedFiles();
11
12
  const projectPassed = runProjectRules(changedFiles.all);
12
13
  const pagesToLint = findPagesToLint(changedFiles);
@@ -14,4 +15,4 @@ const pagesPassed = runRules(pagesToLint);
14
15
  const passed = projectPassed && pagesPassed;
15
16
  if (passed)
16
17
  markPassing(changedFiles);
17
- process.exit(passed ? 0 : 1);
18
+ await sendAndExit(passed ? 0 : 1);
@@ -1,3 +1,4 @@
1
+ import { sendAndExit } from '@wix/origami-bi';
1
2
  import { existsSync, readFileSync } from 'node:fs';
2
3
  import path from 'node:path';
3
4
  /** The site: the folder the lint was started from (`yarn lint` at the site's root). */
@@ -8,12 +9,12 @@ export const LINT_PACKAGE_FILE = path.resolve(import.meta.dirname, '../../packag
8
9
  const LINT_PACKAGE = 'origami-lint';
9
10
  const LINT_PACKAGE_NAME = `@wix/${LINT_PACKAGE}`;
10
11
  /** The lint runs only from the folder whose package.json adds it, which holds the site's git repository. */
11
- export function checkStartedAtSiteRoot() {
12
+ export async function checkStartedAtSiteRoot() {
12
13
  const problem = siteRootProblem();
13
14
  if (!problem)
14
15
  return;
15
16
  console.error(`${LINT_PACKAGE}: ${problem}`);
16
- process.exit(1);
17
+ await sendAndExit(1);
17
18
  }
18
19
  function siteRootProblem() {
19
20
  const packageFile = path.join(ROOT, 'package.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/origami-lint",
3
- "version": "1.34.6",
3
+ "version": "1.34.8",
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,10 +21,11 @@
21
21
  "test": "node --test 'test/*.test.ts'"
22
22
  },
23
23
  "dependencies": {
24
- "@wix/origami-fonts": "1.0.1",
24
+ "@wix/origami-fonts": "1.0.2",
25
25
  "oxc-parser": "^0.151.0",
26
26
  "oxlint": "^1.39.0",
27
- "postcss": "^8.5.3"
27
+ "postcss": "^8.5.3",
28
+ "@wix/origami-bi": "0.4.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/node": "^22.0.0",
@@ -51,5 +52,5 @@
51
52
  ]
52
53
  }
53
54
  },
54
- "falconPackageHash": "bb0df5db12e07d7822c9dfb05afde996c91aa84c7842621d1e8245f2"
55
+ "falconPackageHash": "e568b814f70d3d18688209f5f49e3d9ab28d65fae5881beef484717f"
55
56
  }