@augment-vir/core 31.73.3 → 31.73.4

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.
@@ -5,7 +5,4 @@
5
5
  * @category Package : @augment-vir/common
6
6
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
7
  */
8
- export declare function prettyDiff({ actual, expected, }: Readonly<{
9
- actual: unknown;
10
- expected: unknown;
11
- }>): string;
8
+ export declare function prettyDiff(actual: unknown, expected: unknown): string;
@@ -9,7 +9,7 @@ import { isRuntimeEnv, RuntimeEnv } from '../runtime-env.js';
9
9
  * @category Package : @augment-vir/common
10
10
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
11
11
  */
12
- export function prettyDiff({ actual, expected, }) {
12
+ export function prettyDiff(actual, expected) {
13
13
  const bothStrings = typeof expected === 'string' && typeof actual === 'string';
14
14
  const useLines = typeof expected !== 'string' || typeof actual !== 'string';
15
15
  const diffFunction = (useLines ? diffLines : diffWords);
@@ -1,5 +1,5 @@
1
1
  import { type prettyDiff } from './pretty-diff.js';
2
2
  export declare const mockPrettyDiffTestCases: {
3
3
  it: string;
4
- input: Parameters<typeof prettyDiff>[0];
4
+ inputs: Parameters<typeof prettyDiff>;
5
5
  }[];
@@ -1,67 +1,67 @@
1
1
  export const mockPrettyDiffTestCases = [
2
2
  {
3
3
  it: 'handles strings',
4
- input: {
5
- actual: 'hello there why',
6
- expected: 'hello what why',
7
- },
4
+ inputs: [
5
+ 'hello there why',
6
+ 'hello what why',
7
+ ],
8
8
  },
9
9
  {
10
10
  it: 'handles objects',
11
- input: {
12
- actual: {
11
+ inputs: [
12
+ {
13
13
  a: 'hello there',
14
14
  b: 'goodbye now',
15
15
  },
16
- expected: {
16
+ {
17
17
  a: 'hello there',
18
18
  },
19
- },
19
+ ],
20
20
  },
21
21
  {
22
22
  it: 'handles numbers',
23
- input: {
24
- actual: 52,
25
- expected: 40,
26
- },
23
+ inputs: [
24
+ 52,
25
+ 40,
26
+ ],
27
27
  },
28
28
  {
29
29
  it: 'expected object but got string',
30
- input: {
31
- actual: 'hello there',
32
- expected: {
30
+ inputs: [
31
+ 'hello there',
32
+ {
33
33
  a: 'hello there',
34
34
  },
35
- },
35
+ ],
36
36
  },
37
37
  {
38
38
  it: 'expected string but got object',
39
- input: {
40
- actual: {
39
+ inputs: [
40
+ {
41
41
  a: 'hello there',
42
42
  },
43
- expected: 'hello there',
44
- },
43
+ 'hello there',
44
+ ],
45
45
  },
46
46
  {
47
47
  it: 'expected number but got string',
48
- input: {
49
- actual: 'hello there',
50
- expected: 42,
51
- },
48
+ inputs: [
49
+ 'hello there',
50
+ 42,
51
+ ],
52
52
  },
53
53
  {
54
54
  it: 'expected string but got number',
55
- input: {
56
- actual: 42,
57
- expected: 'hello there',
58
- },
55
+ inputs: [
56
+ 42,
57
+ 'hello there',
58
+ ],
59
59
  },
60
60
  {
61
61
  it: 'got completely different strings',
62
- input: {
63
- actual: 'nothing here',
64
- expected: 'hello there',
65
- },
62
+ inputs: [
63
+ 'nothing here',
64
+ 'hello there',
65
+ ],
66
66
  },
67
67
  ];
@@ -5,5 +5,5 @@ import { mockPrettyDiffTestCases } from './pretty-diff.mock.js';
5
5
  mockPrettyDiffTestCases.forEach((testCase) => {
6
6
  console.info('================================');
7
7
  console.info(testCase.it);
8
- console.info(prettyDiff(testCase.input));
8
+ console.info(prettyDiff(...testCase.inputs));
9
9
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.73.3",
3
+ "version": "31.73.4",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {
@@ -28,14 +28,14 @@
28
28
  "test:update": "npm test update"
29
29
  },
30
30
  "dependencies": {
31
- "@date-vir/duration": "^8.6.1",
31
+ "@date-vir/duration": "^8.5.0",
32
32
  "browser-or-node": "^3.0.0",
33
33
  "diff": "^9.0.0",
34
34
  "json5": "^2.2.3",
35
35
  "type-fest": "^5.7.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^26.0.1",
38
+ "@types/node": "^25.9.3",
39
39
  "c8": "^11.0.0",
40
40
  "istanbul-smart-text-reporter": "^1.1.5",
41
41
  "typescript": "^6.0.3"