@ryanatkn/gro 0.129.8 → 0.129.10

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 (95) hide show
  1. package/dist/package.js +3 -3
  2. package/package.json +4 -2
  3. package/src/lib/package.ts +3 -3
  4. package/dist/args.test.d.ts +0 -2
  5. package/dist/args.test.d.ts.map +0 -1
  6. package/dist/args.test.js +0 -43
  7. package/dist/changelog.test.d.ts +0 -2
  8. package/dist/changelog.test.d.ts.map +0 -1
  9. package/dist/changelog.test.js +0 -118
  10. package/dist/config.test.d.ts +0 -2
  11. package/dist/config.test.d.ts.map +0 -1
  12. package/dist/config.test.js +0 -64
  13. package/dist/esbuild_plugin_svelte.test.d.ts +0 -2
  14. package/dist/esbuild_plugin_svelte.test.d.ts.map +0 -1
  15. package/dist/esbuild_plugin_svelte.test.js +0 -74
  16. package/dist/format_file.test.d.ts +0 -2
  17. package/dist/format_file.test.d.ts.map +0 -1
  18. package/dist/format_file.test.js +0 -16
  19. package/dist/gen.test.d.ts +0 -2
  20. package/dist/gen.test.d.ts.map +0 -1
  21. package/dist/gen.test.js +0 -248
  22. package/dist/git.test.d.ts +0 -2
  23. package/dist/git.test.d.ts.map +0 -1
  24. package/dist/git.test.js +0 -21
  25. package/dist/hash.test.d.ts +0 -2
  26. package/dist/hash.test.d.ts.map +0 -1
  27. package/dist/hash.test.js +0 -25
  28. package/dist/input_path.test.d.ts +0 -2
  29. package/dist/input_path.test.d.ts.map +0 -1
  30. package/dist/input_path.test.js +0 -205
  31. package/dist/loader.test.d.ts +0 -2
  32. package/dist/loader.test.d.ts.map +0 -1
  33. package/dist/loader.test.js +0 -41
  34. package/dist/module.test.d.ts +0 -2
  35. package/dist/module.test.d.ts.map +0 -1
  36. package/dist/module.test.js +0 -41
  37. package/dist/modules.test.d.ts +0 -2
  38. package/dist/modules.test.d.ts.map +0 -1
  39. package/dist/modules.test.js +0 -58
  40. package/dist/package_json.test.d.ts +0 -2
  41. package/dist/package_json.test.d.ts.map +0 -1
  42. package/dist/package_json.test.js +0 -84
  43. package/dist/paths.test.d.ts +0 -2
  44. package/dist/paths.test.d.ts.map +0 -1
  45. package/dist/paths.test.js +0 -51
  46. package/dist/plugin.test.d.ts +0 -2
  47. package/dist/plugin.test.d.ts.map +0 -1
  48. package/dist/plugin.test.js +0 -54
  49. package/dist/resolve_node_specifier.test.d.ts +0 -2
  50. package/dist/resolve_node_specifier.test.d.ts.map +0 -1
  51. package/dist/resolve_node_specifier.test.js +0 -21
  52. package/dist/resolve_specifier.test.d.ts +0 -2
  53. package/dist/resolve_specifier.test.d.ts.map +0 -1
  54. package/dist/resolve_specifier.test.js +0 -66
  55. package/dist/run_gen.test.d.ts +0 -2
  56. package/dist/run_gen.test.d.ts.map +0 -1
  57. package/dist/run_gen.test.js +0 -178
  58. package/dist/run_task.test.d.ts +0 -2
  59. package/dist/run_task.test.d.ts.map +0 -1
  60. package/dist/run_task.test.js +0 -64
  61. package/dist/search_fs.test.d.ts +0 -2
  62. package/dist/search_fs.test.d.ts.map +0 -1
  63. package/dist/search_fs.test.js +0 -48
  64. package/dist/src_json.test.d.ts +0 -2
  65. package/dist/src_json.test.d.ts.map +0 -1
  66. package/dist/src_json.test.js +0 -39
  67. package/dist/task.test.d.ts +0 -2
  68. package/dist/task.test.d.ts.map +0 -1
  69. package/dist/task.test.js +0 -46
  70. package/dist/throttle.test.d.ts +0 -2
  71. package/dist/throttle.test.d.ts.map +0 -1
  72. package/dist/throttle.test.js +0 -49
  73. package/src/lib/args.test.ts +0 -59
  74. package/src/lib/changelog.test.ts +0 -138
  75. package/src/lib/config.test.ts +0 -71
  76. package/src/lib/esbuild_plugin_svelte.test.ts +0 -88
  77. package/src/lib/format_file.test.ts +0 -20
  78. package/src/lib/gen.test.ts +0 -306
  79. package/src/lib/git.test.ts +0 -34
  80. package/src/lib/hash.test.ts +0 -33
  81. package/src/lib/input_path.test.ts +0 -230
  82. package/src/lib/loader.test.ts +0 -49
  83. package/src/lib/module.test.ts +0 -46
  84. package/src/lib/modules.test.ts +0 -63
  85. package/src/lib/package_json.test.ts +0 -101
  86. package/src/lib/paths.test.ts +0 -77
  87. package/src/lib/plugin.test.ts +0 -57
  88. package/src/lib/resolve_node_specifier.test.ts +0 -31
  89. package/src/lib/resolve_specifier.test.ts +0 -76
  90. package/src/lib/run_gen.test.ts +0 -196
  91. package/src/lib/run_task.test.ts +0 -86
  92. package/src/lib/search_fs.test.ts +0 -56
  93. package/src/lib/src_json.test.ts +0 -49
  94. package/src/lib/task.test.ts +0 -84
  95. package/src/lib/throttle.test.ts +0 -52
package/dist/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // generated by src/lib/package.gen.ts
2
2
  export const package_json = {
3
3
  name: '@ryanatkn/gro',
4
- version: '0.129.8',
4
+ version: '0.129.10',
5
5
  description: 'task runner and toolkit extending SvelteKit',
6
6
  motto: 'generate, run, optimize',
7
7
  glyph: '🌰',
@@ -82,7 +82,7 @@ export const package_json = {
82
82
  overrides: [{ files: 'package.json', options: { useTabs: false } }],
83
83
  },
84
84
  sideEffects: ['**/*.css'],
85
- files: ['dist', 'src/lib'],
85
+ files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'],
86
86
  exports: {
87
87
  '.': { types: './dist/index.d.ts', default: './dist/index.js' },
88
88
  './package.json': './package.json',
@@ -266,7 +266,7 @@ export const package_json = {
266
266
  };
267
267
  export const src_json = {
268
268
  name: '@ryanatkn/gro',
269
- version: '0.129.8',
269
+ version: '0.129.10',
270
270
  modules: {
271
271
  '.': {
272
272
  path: 'index.ts',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanatkn/gro",
3
- "version": "0.129.8",
3
+ "version": "0.129.10",
4
4
  "description": "task runner and toolkit extending SvelteKit",
5
5
  "motto": "generate, run, optimize",
6
6
  "glyph": "🌰",
@@ -108,7 +108,9 @@
108
108
  ],
109
109
  "files": [
110
110
  "dist",
111
- "src/lib"
111
+ "src/lib/**/*.ts",
112
+ "!src/lib/**/*.test.*",
113
+ "!dist/**/*.test.*"
112
114
  ],
113
115
  "exports": {
114
116
  ".": {
@@ -5,7 +5,7 @@ import type {Src_Json} from './src_json.js';
5
5
 
6
6
  export const package_json = {
7
7
  name: '@ryanatkn/gro',
8
- version: '0.129.8',
8
+ version: '0.129.10',
9
9
  description: 'task runner and toolkit extending SvelteKit',
10
10
  motto: 'generate, run, optimize',
11
11
  glyph: '🌰',
@@ -87,7 +87,7 @@ export const package_json = {
87
87
  overrides: [{files: 'package.json', options: {useTabs: false}}],
88
88
  },
89
89
  sideEffects: ['**/*.css'],
90
- files: ['dist', 'src/lib'],
90
+ files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'],
91
91
  exports: {
92
92
  '.': {types: './dist/index.d.ts', default: './dist/index.js'},
93
93
  './package.json': './package.json',
@@ -272,7 +272,7 @@ export const package_json = {
272
272
 
273
273
  export const src_json = {
274
274
  name: '@ryanatkn/gro',
275
- version: '0.129.8',
275
+ version: '0.129.10',
276
276
  modules: {
277
277
  '.': {
278
278
  path: 'index.ts',
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=args.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"args.test.d.ts","sourceRoot":"","sources":["../../../src/lib/args.test.ts"],"names":[],"mappings":""}
package/dist/args.test.js DELETED
@@ -1,43 +0,0 @@
1
- import mri from 'mri';
2
- import { suite } from 'uvu';
3
- import * as assert from 'uvu/assert';
4
- import { serialize_args, to_forwarded_args, to_forwarded_args_by_command, to_raw_rest_args, } from './args.js';
5
- /* test__serialize_args */
6
- const test__serialize_args = suite('serialize_args');
7
- test__serialize_args('basic behavior', () => {
8
- const raw = ['a', '-i', '1', 'b', 'c', '-i', '-i', 'three'];
9
- const parsed = mri(raw);
10
- assert.equal(parsed, { _: ['a', 'b', 'c'], i: [1, true, 'three'] });
11
- const serialized = serialize_args(parsed);
12
- assert.equal(serialized, ['a', 'b', 'c', '-i', '1', '-i', '-i', 'three']); // sorted
13
- });
14
- test__serialize_args.run();
15
- /* test__serialize_args */
16
- /* test__to_forwarded_args_by_command */
17
- const test__to_forwarded_args_by_command = suite('to_forwarded_args_by_command');
18
- test__to_forwarded_args_by_command('basic behavior', () => {
19
- const raw_rest_args = to_raw_rest_args(('gro taskname a b c --d -e 1 -- -- ' +
20
- 'eslint a --b c -- ' +
21
- 'gro a --a -- ' +
22
- 'tsc -b -- ' +
23
- 'gro b -t2 t2a --t2 t2b --t222 2 -- -- -- ' +
24
- 'groc --m --n nn -- ' +
25
- 'gro d -b a --c 4 -- ' +
26
- 'gro d -b a --c 5 -- ').split(' '));
27
- assert.equal(to_forwarded_args_by_command(raw_rest_args), {
28
- eslint: { _: ['a'], b: 'c' },
29
- 'gro a': { a: true },
30
- tsc: { b: true },
31
- 'gro b': { '2': 't2a', t: true, t2: 't2b', t222: 2 },
32
- groc: { m: true, n: 'nn' },
33
- 'gro d': { b: 'a', c: 5 },
34
- });
35
- assert.equal(to_forwarded_args('gro b', raw_rest_args), {
36
- '2': 't2a',
37
- t: true,
38
- t2: 't2b',
39
- t222: 2,
40
- });
41
- });
42
- test__to_forwarded_args_by_command.run();
43
- /* test__to_forwarded_args_by_command */
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=changelog.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"changelog.test.d.ts","sourceRoot":"","sources":["../../../src/lib/changelog.test.ts"],"names":[],"mappings":""}
@@ -1,118 +0,0 @@
1
- import { test } from 'uvu';
2
- import * as assert from 'uvu/assert';
3
- import { Logger } from '@ryanatkn/belt/log.js';
4
- import { readFile, writeFile } from 'node:fs/promises';
5
- import { update_changelog } from './changelog.js';
6
- import { load_from_env } from './env.js';
7
- const log = new Logger();
8
- const token = load_from_env('GITHUB_TOKEN_SECRET');
9
- if (!token) {
10
- log.warn('the env var GITHUB_TOKEN_SECRET was not found, so API calls with be unauthorized');
11
- }
12
- const fixture_path = 'src/fixtures/changelog_example.md';
13
- // TODO ideally this is just a ts file, but there's a problem where building outputs a `.d.ts` file
14
- // when importing from src/fixtures (fix in SvelteKit/Vite/tsconfig?) and I want to keep it in src/fixtures
15
- const changelog_cache_fixture = new Map(JSON.parse(await readFile('src/fixtures/changelog_cache.json', 'utf8')));
16
- test('update_changelog', async () => {
17
- const original = await readFile(fixture_path, 'utf8');
18
- const result = await update_changelog('ryanatkn', 'gro', fixture_path, token, log, changelog_cache_fixture);
19
- const updated = await readFile(fixture_path, 'utf8');
20
- await writeFile(fixture_path, original, 'utf8');
21
- assert.ok(result);
22
- assert.is(updated, `# @ryanatkn/gro
23
-
24
- ## 0.6.0
25
-
26
- ### Minor Changes
27
-
28
- - duplicate 1 ([#429](https://github.com/ryanatkn/gro/pull/429))
29
- - duplicate 2 ([#429](https://github.com/ryanatkn/gro/pull/429))
30
- - abc ([#437](https://github.com/ryanatkn/gro/pull/437))
31
-
32
- - 123
33
- - 123
34
- - 123
35
-
36
- ### Patch Changes
37
-
38
- - abc ([5e94cd4](https://github.com/ryanatkn/gro/commit/5e94cd4))
39
-
40
- ## 0.5.2
41
-
42
- ### Patch Changes
43
-
44
- - abc ([e345eaa](https://github.com/ryanatkn/gro/commit/e345eaa))
45
-
46
- ## 0.5.1
47
-
48
- ### Patch Changes
49
-
50
- - abc ([094279d](https://github.com/ryanatkn/gro/commit/094279d))
51
-
52
- ## 0.5.0
53
-
54
- ### Minor Changes
55
-
56
- - abc ([f6133f7](https://github.com/ryanatkn/gro/commit/f6133f7))
57
-
58
- ## 0.4.3
59
-
60
- ### Patch Changes
61
-
62
- - abc ([54b65ec](https://github.com/ryanatkn/gro/commit/54b65ec))
63
-
64
- ## 0.4.2
65
-
66
- ### Patch Changes
67
-
68
- - abc ([80365d0](https://github.com/ryanatkn/gro/commit/80365d0))
69
-
70
- ## 0.4.1
71
-
72
- ### Patch Changes
73
-
74
- - abc ([3d84dfd](https://github.com/ryanatkn/gro/commit/3d84dfd))
75
- - abc ([fc64b77](https://github.com/ryanatkn/gro/commit/fc64b77))
76
-
77
- ## 0.4.0
78
-
79
- ### Minor Changes
80
-
81
- - abc ([#434](https://github.com/ryanatkn/gro/pull/434))
82
- - 123
83
- - 123
84
-
85
- ### Patch Changes
86
-
87
- - abc ([#434](https://github.com/ryanatkn/gro/pull/434))
88
-
89
- ## 0.3.1
90
-
91
- - e
92
-
93
- ## 0.3.0
94
-
95
- - b2
96
- - c2
97
- - d2
98
-
99
- ## 0.2.0
100
-
101
- - a2
102
-
103
- ## 0.1.2
104
-
105
- - e
106
-
107
- ## 0.1.1
108
-
109
- - b
110
- - c
111
- - d
112
-
113
- ## 0.1.0
114
-
115
- - a
116
- `);
117
- });
118
- test.run();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=config.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../../../src/lib/config.test.ts"],"names":[],"mappings":""}
@@ -1,64 +0,0 @@
1
- import { test } from 'uvu';
2
- import * as assert from 'uvu/assert';
3
- import { DEFAULT_SEARCH_EXCLUDER, load_config } from './config.js';
4
- test('load_config', async () => {
5
- const config = await load_config();
6
- assert.ok(config);
7
- });
8
- test('DEFAULT_SEARCH_EXCLUDER', () => {
9
- const assert_includes = (path, exclude) => {
10
- const m = `should ${exclude ? 'exclude' : 'include '}: ${path}`;
11
- const b = (v) => (exclude ? !v : v);
12
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`a/${path}/c`)), m);
13
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`a/${path}/c/d.js`)), m);
14
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`a/${path}/c/d.e.js`)), m);
15
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`a/${path}/`)), m);
16
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`a/${path}`)), m);
17
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/a/${path}/c`)), m);
18
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/a/${path}/c/d.js`)), m);
19
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/a/${path}/c/d.e.js`)), m);
20
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/a/${path}/`)), m);
21
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/a/${path}`)), m);
22
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/${path}/a`)), m);
23
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/${path}/a/b.js`)), m);
24
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/${path}/a/b.e.js`)), m);
25
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/${path}/`)), m);
26
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`/${path}`)), m);
27
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`./${path}/a`)), m);
28
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`./${path}/a/b.js`)), m);
29
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`./${path}/a/b.c.js`)), m);
30
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`./${path}/`)), m);
31
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`./${path}`)), m);
32
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`${path}/a`)), m);
33
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`${path}/a/b.js`)), m);
34
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`${path}/a/b.c.js`)), m);
35
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(`${path}/`)), m);
36
- assert.ok(b(DEFAULT_SEARCH_EXCLUDER.test(path)), m);
37
- };
38
- assert_includes('node_modules', false);
39
- assert_includes('dist', false);
40
- assert_includes('build', false);
41
- assert_includes('.git', false);
42
- assert_includes('.gro', false);
43
- assert_includes('.svelte-kit', false);
44
- assert_includes('a', true);
45
- assert_includes('nodemodules', true);
46
- // Special exception for `gro/dist/`, but not `gro/build/` etc because they're not usecases.
47
- assert_includes('gro/build', false);
48
- assert_includes('gro/buildE', true);
49
- assert_includes('groE/build', false);
50
- assert_includes('gro/dist', true);
51
- assert_includes('node_modules/gro/dist', true);
52
- assert_includes('node_modules/@someuser/gro/dist', true);
53
- assert_includes('node_modules/@someuser/foo/gro/dist', false);
54
- assert_includes('gro/distE', true);
55
- assert_includes('groE/dist', false);
56
- assert_includes('Egro/dist', false);
57
- assert_includes('Ebuild', true);
58
- assert_includes('buildE', true);
59
- assert_includes('grobuild', true);
60
- assert_includes('distE', true);
61
- assert_includes('Edist', true);
62
- assert_includes('grodist', true);
63
- });
64
- test.run();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=esbuild_plugin_svelte.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"esbuild_plugin_svelte.test.d.ts","sourceRoot":"","sources":["../../../src/lib/esbuild_plugin_svelte.test.ts"],"names":[],"mappings":""}
@@ -1,74 +0,0 @@
1
- import { test } from 'uvu';
2
- import * as assert from 'uvu/assert';
3
- import * as esbuild from 'esbuild';
4
- import { readFile, rm } from 'node:fs/promises';
5
- import { esbuild_plugin_svelte } from './esbuild_plugin_svelte.js';
6
- test('build for the client', async () => {
7
- const outfile = './src/fixtures/modules/some_test_server_bundle_DELETEME.js';
8
- const built = await esbuild.build({
9
- entryPoints: ['./src/fixtures/modules/some_test_server.ts'],
10
- plugins: [esbuild_plugin_svelte()],
11
- outfile,
12
- format: 'esm',
13
- platform: 'node',
14
- packages: 'external',
15
- bundle: true,
16
- target: 'esnext',
17
- });
18
- assert.is(built.errors.length, 0);
19
- assert.is(built.warnings.length, 0);
20
- const built_output = await readFile(outfile, 'utf8');
21
- assert.is(built_output, `// src/fixtures/modules/some_test_svelte_ts.svelte.ts
22
- import * as $ from "svelte/internal/client";
23
- var Some_Test_Svelte_Ts = class {
24
- #a = $.source("ok");
25
- get a() {
26
- return $.get(this.#a);
27
- }
28
- set a(value) {
29
- $.set(this.#a, $.proxy(value));
30
- }
31
- };
32
-
33
- // src/fixtures/modules/some_test_server.ts
34
- var some_test_server = "some_test_server";
35
- var Rexported_Some_Test_Svelte_Ts = Some_Test_Svelte_Ts;
36
- export {
37
- Rexported_Some_Test_Svelte_Ts,
38
- some_test_server
39
- };
40
- `);
41
- await rm(outfile); // TODO could be cleaner
42
- });
43
- test('build for the server', async () => {
44
- const outfile = './src/fixtures/modules/some_test_client_bundle_DELETEME.js';
45
- const built = await esbuild.build({
46
- entryPoints: ['./src/fixtures/modules/some_test_server.ts'],
47
- plugins: [esbuild_plugin_svelte({ svelte_compile_module_options: { generate: 'server' } })],
48
- outfile,
49
- format: 'esm',
50
- platform: 'node',
51
- packages: 'external',
52
- bundle: true,
53
- target: 'esnext',
54
- });
55
- assert.is(built.errors.length, 0);
56
- assert.is(built.warnings.length, 0);
57
- const built_output = await readFile(outfile, 'utf8');
58
- assert.is(built_output, `// src/fixtures/modules/some_test_svelte_ts.svelte.ts
59
- import * as $ from "svelte/internal/server";
60
- var Some_Test_Svelte_Ts = class {
61
- a = "ok";
62
- };
63
-
64
- // src/fixtures/modules/some_test_server.ts
65
- var some_test_server = "some_test_server";
66
- var Rexported_Some_Test_Svelte_Ts = Some_Test_Svelte_Ts;
67
- export {
68
- Rexported_Some_Test_Svelte_Ts,
69
- some_test_server
70
- };
71
- `);
72
- await rm(outfile); // TODO could be cleaner
73
- });
74
- test.run();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=format_file.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format_file.test.d.ts","sourceRoot":"","sources":["../../../src/lib/format_file.test.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- import { test } from 'uvu';
2
- import * as assert from 'uvu/assert';
3
- import { format_file } from './format_file.js';
4
- test('format ts', async () => {
5
- const ts_unformatted = 'hey (1)';
6
- const ts_formatted = 'hey(1);\n';
7
- assert.is(await format_file(ts_unformatted, { filepath: 'foo.ts' }), ts_formatted);
8
- assert.is(await format_file(ts_unformatted, { parser: 'typescript' }), ts_formatted);
9
- });
10
- test('format svelte', async () => {
11
- const svelte_unformatted = '<style>a{color: red}</style>';
12
- const svelte_formatted = '<style>\n\ta {\n\t\tcolor: red;\n\t}\n</style>\n';
13
- assert.is(await format_file(svelte_unformatted, { filepath: 'foo.svelte' }), svelte_formatted);
14
- assert.is(await format_file(svelte_unformatted, { parser: 'svelte' }), svelte_formatted);
15
- });
16
- test.run();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=gen.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gen.test.d.ts","sourceRoot":"","sources":["../../../src/lib/gen.test.ts"],"names":[],"mappings":""}