@gjsify/tsc 0.26.1 → 0.27.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/tsc",
3
- "version": "0.26.1",
3
+ "version": "0.27.1",
4
4
  "description": "TypeScript compiler for GJS — bundles upstream `typescript` to a single GJS module + ships a Node-free `tsc` bin.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -26,7 +26,7 @@
26
26
  "lib/lib*.d.ts"
27
27
  ],
28
28
  "scripts": {
29
- "clear": "rm -rf dist tsconfig.tsbuildinfo || exit 0",
29
+ "clear": "gjsify clear dist tsconfig.tsbuildinfo",
30
30
  "check": "gjsify tsc --noEmit",
31
31
  "build": "node scripts/build-bundle.mjs",
32
32
  "build:gjsify": "node scripts/build-bundle.mjs",
@@ -52,13 +52,13 @@
52
52
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/infra/tsc#readme",
53
53
  "license": "MIT",
54
54
  "dependencies": {
55
- "@gjsify/console": "^0.26.1",
56
- "@gjsify/node-globals": "^0.26.1",
57
- "@gjsify/web-globals": "^0.26.1"
55
+ "@gjsify/console": "^0.27.1",
56
+ "@gjsify/node-globals": "^0.27.1",
57
+ "@gjsify/web-globals": "^0.27.1"
58
58
  },
59
59
  "devDependencies": {
60
- "@gjsify/cli": "^0.26.1",
61
- "@gjsify/unit": "^0.26.1",
60
+ "@gjsify/cli": "^0.27.1",
61
+ "@gjsify/unit": "^0.27.1",
62
62
  "@girs/gio-2.0": "^4.1.0",
63
63
  "@girs/glib-2.0": "^4.1.0",
64
64
  "typescript": "^6.0.3"
@@ -55,16 +55,8 @@ function makeProject(filename: string, source: string, lib?: string[]): string {
55
55
  function cleanupProject(dir: string): void {
56
56
  try {
57
57
  const file = Gio.File.new_for_path(dir);
58
- const enumerator = file.enumerate_children(
59
- 'standard::name',
60
- Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS,
61
- null,
62
- );
63
- for (
64
- let info = enumerator.next_file(null);
65
- info !== null;
66
- info = enumerator.next_file(null)
67
- ) {
58
+ const enumerator = file.enumerate_children('standard::name', Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, null);
59
+ for (let info = enumerator.next_file(null); info !== null; info = enumerator.next_file(null)) {
68
60
  file.get_child(info.get_name()).delete(null);
69
61
  }
70
62
  enumerator.close(null);
@@ -115,11 +107,10 @@ export default async () => {
115
107
  // + a cascade of `error TS2318: Cannot find global type 'Array'/…`.
116
108
  // Now the only error must be the deliberate Promise type mismatch.
117
109
  await it('resolves explicit "lib" without TS6053/TS2318 and still catches the deliberate error', async () => {
118
- const tmp = makeProject(
119
- 'libcheck.ts',
120
- 'const p: Promise<number> = "x";\nexport { p };\n',
121
- ['ESNext', 'DOM'],
122
- );
110
+ const tmp = makeProject('libcheck.ts', 'const p: Promise<number> = "x";\nexport { p };\n', [
111
+ 'ESNext',
112
+ 'DOM',
113
+ ]);
123
114
  try {
124
115
  const { stdout, status } = runTsc(['-p', tmp]);
125
116
  // No missing-lib / missing-global-type errors.
package/src/index.ts CHANGED
@@ -18,12 +18,7 @@ import { fileURLToPath } from 'node:url';
18
18
  import { dirname, resolve } from 'node:path';
19
19
 
20
20
  /** Absolute path to the bundled `tsc` GJS module, relative to this file. */
21
- export const TSC_BUNDLE_PATH: string = resolve(
22
- dirname(fileURLToPath(import.meta.url)),
23
- '..',
24
- 'dist',
25
- 'tsc.gjs.mjs',
26
- );
21
+ export const TSC_BUNDLE_PATH: string = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'dist', 'tsc.gjs.mjs');
27
22
 
28
23
  /** Pinned upstream TypeScript version the shipped bundle was built from.
29
24
  *