@somewhatabstract/x 0.1.0 → 0.2.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.
Files changed (40) hide show
  1. package/README.md +9 -37
  2. package/dist/x.mjs +13 -20
  3. package/package.json +6 -3
  4. package/.changeset/README.md +0 -8
  5. package/.changeset/config.json +0 -11
  6. package/.github/codeql/codeql-config.yml +0 -5
  7. package/.github/dependabot.yml +0 -28
  8. package/.github/workflows/codeql-analysis.yml +0 -71
  9. package/.github/workflows/dependabot-pr-approval.yml +0 -36
  10. package/.github/workflows/nodejs.yml +0 -129
  11. package/.github/workflows/release.yml +0 -95
  12. package/.vscode/settings.json +0 -19
  13. package/CHANGELOG.md +0 -23
  14. package/CODE_OF_CONDUCT.md +0 -76
  15. package/CONTRIBUTING.md +0 -70
  16. package/biome.json +0 -39
  17. package/src/__tests__/build-environment.test.ts +0 -285
  18. package/src/__tests__/discover-packages.test.ts +0 -196
  19. package/src/__tests__/errors.test.ts +0 -59
  20. package/src/__tests__/execute-script.test.ts +0 -1042
  21. package/src/__tests__/find-matching-bins.test.ts +0 -506
  22. package/src/__tests__/find-workspace-root.test.ts +0 -73
  23. package/src/__tests__/is-node-executable.test.ts +0 -125
  24. package/src/__tests__/resolve-bin-path.test.ts +0 -344
  25. package/src/__tests__/x-impl.test.ts +0 -314
  26. package/src/__tests__/x.test.ts +0 -236
  27. package/src/bin/x.ts +0 -57
  28. package/src/build-environment.ts +0 -98
  29. package/src/discover-packages.ts +0 -35
  30. package/src/errors.ts +0 -10
  31. package/src/execute-script.ts +0 -56
  32. package/src/find-matching-bins.ts +0 -72
  33. package/src/find-workspace-root.ts +0 -24
  34. package/src/is-node-executable.ts +0 -16
  35. package/src/resolve-bin-path.ts +0 -48
  36. package/src/x-impl.ts +0 -96
  37. package/tsconfig-types.json +0 -5
  38. package/tsconfig.json +0 -21
  39. package/tsdown.config.ts +0 -24
  40. package/vitest.config.ts +0 -10
@@ -1,59 +0,0 @@
1
- import {describe, expect, it} from "vitest";
2
- import {HandledError} from "../errors";
3
-
4
- describe("HandledError", () => {
5
- it("should be an instance of Error", () => {
6
- // Arrange
7
- const error = new HandledError("Test error message");
8
-
9
- // Act
10
- const isError = error instanceof Error;
11
-
12
- // Assert
13
- expect(isError).toBe(true);
14
- });
15
-
16
- it("should have name 'HandledError'", () => {
17
- // Arrange
18
- const error = new HandledError("Test error message");
19
-
20
- // Act
21
- const name = error.name;
22
-
23
- // Assert
24
- expect(name).toBe("HandledError");
25
- });
26
-
27
- it("should preserve the error message", () => {
28
- // Arrange
29
- const message = "Test error message";
30
-
31
- // Act
32
- const error = new HandledError(message);
33
-
34
- // Assert
35
- expect(error.message).toBe(message);
36
- });
37
-
38
- it("should be distinguishable from HandledError type", () => {
39
- // Arrange
40
- const handledError = new HandledError("Handled");
41
-
42
- // Act
43
- const isHandledError = handledError instanceof HandledError;
44
-
45
- // Assert
46
- expect(isHandledError).toBe(true);
47
- });
48
-
49
- it("should distinguish regular errors from HandledError type", () => {
50
- // Arrange
51
- const regularError = new Error("Regular");
52
-
53
- // Act
54
- const isHandledError = regularError instanceof HandledError;
55
-
56
- // Assert
57
- expect(isHandledError).toBe(false);
58
- });
59
- });