@gjsify/tsc 0.4.34

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 ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@gjsify/tsc",
3
+ "version": "0.4.34",
4
+ "description": "TypeScript compiler for GJS — bundles upstream `typescript` to a single GJS module + ships a Node-free `tsc` bin.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "exports": {
8
+ ".": "./src/index.ts",
9
+ "./bundle": "./dist/tsc.gjs.mjs",
10
+ "./package.json": "./package.json"
11
+ },
12
+ "bin": {
13
+ "gjsify-tsc": "./dist/tsc.gjs.mjs"
14
+ },
15
+ "gjsify": {
16
+ "runtimes": {
17
+ "gjs": "polyfill",
18
+ "node": "none",
19
+ "browser": "none"
20
+ }
21
+ },
22
+ "files": [
23
+ "src",
24
+ "dist/tsc.gjs.mjs"
25
+ ],
26
+ "scripts": {
27
+ "clear": "rm -rf dist tsconfig.tsbuildinfo || exit 0",
28
+ "check": "tsc --noEmit",
29
+ "build": "node scripts/build-bundle.mjs",
30
+ "build:gjsify": "node scripts/build-bundle.mjs"
31
+ },
32
+ "keywords": [
33
+ "gjs",
34
+ "gjsify",
35
+ "typescript",
36
+ "tsc",
37
+ "compiler"
38
+ ],
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/gjsify/gjsify.git",
42
+ "directory": "packages/infra/tsc"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/gjsify/gjsify/issues"
46
+ },
47
+ "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/infra/tsc#readme",
48
+ "license": "MIT",
49
+ "dependencies": {},
50
+ "devDependencies": {
51
+ "@gjsify/cli": "workspace:^",
52
+ "typescript": "^6.0.3"
53
+ }
54
+ }
package/src/index.ts ADDED
@@ -0,0 +1,29 @@
1
+ // @gjsify/tsc — TypeScript compiler for GJS.
2
+ //
3
+ // The actual `tsc` runtime is the committed bundle at `dist/tsc.gjs.mjs`,
4
+ // built from upstream `typescript`'s `_tsc.js` via `gjsify build --app gjs`.
5
+ // That bundle is wired up as the `gjsify-tsc` bin and as the `./bundle`
6
+ // export — those are the entry points consumers reach for.
7
+ //
8
+ // This module is metadata-only. It exists so the package has a non-bundle
9
+ // TypeScript surface for things like `import { TSC_BUNDLE_PATH } from
10
+ // '@gjsify/tsc'` from helper scripts and for future programmatic API
11
+ // re-exports (e.g. once we ship a `typescript.gjs.mjs` library bundle, the
12
+ // `createProgram` / `createCompilerHost` re-exports land here).
13
+ //
14
+ // Reference: Adapted from typescript (refs/typescript). Copyright (c) Microsoft Corporation.
15
+ // Modifications: bundled for GJS via @gjsify/cli; this metadata stub is original gjsify code.
16
+
17
+ import { fileURLToPath } from 'node:url';
18
+ import { dirname, resolve } from 'node:path';
19
+
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
+ );
27
+
28
+ /** Pinned upstream TypeScript version the shipped bundle was built from. */
29
+ export const TYPESCRIPT_VERSION = '5.9.3' as const;