{"id":24936,"library":"atom-ts-transpiler","title":"atom-ts-transpiler","description":"A custom transpiler for Atom packages that enables running TypeScript code directly in the Atom editor. The current stable version is 1.5.3 (released 2020-11-08). This package is in maintenance mode, as the Atom editor itself is now archived. It provides a simple interface between Atom and the TypeScript compiler, supporting TypeScript versions 1.6 through 4.x. Key differentiators: respects tsconfig.json automatically, minimal performance overhead after initial caching, and small footprint (~20 KB). Compared to alternatives like manual pre-transpilation, it allows distributing Atom packages as TypeScript source.","status":"maintenance","version":"1.5.3","language":"javascript","source_language":"en","source_url":"https://github.com/smhxx/atom-ts-transpiler","tags":["javascript","atom","typescript","ts","transpile","transpiler"],"install":[{"cmd":"npm install atom-ts-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add atom-ts-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add atom-ts-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the TypeScript compiler is used to transpile .ts files. Must be installed separately.","package":"typescript","optional":false}],"imports":[{"note":"This package is not required in code; it's configured in Atom's metadata. Common mistake: trying to import it programmatically.","wrong":"const transpiler = require('atom-ts-transpiler')","symbol":"atom-ts-transpiler","correct":"// In your Atom package's package.json: { \"transpiler\": \"atom-ts-transpiler\" }"},{"note":"TypeScript must be installed as a peer dependency. The import above works in both ESM and CJS contexts within Atom scripts.","wrong":"const ts = require('typescript')","symbol":"TypeScript","correct":"import * as ts from 'typescript'"},{"note":"The transpiler is only used internally by Atom; you don't import its functions directly.","wrong":"const { transpile } = require('atom-ts-transpiler')","symbol":"Atom's transpiler interface","correct":"// Atom loads the transpiler automatically when configured in package.json"}],"quickstart":{"code":"// In your Atom package's root, create package.json with:\n{\n  \"name\": \"my-atom-package\",\n  \"main\": \"./lib/main.ts\",\n  \"transpiler\": \"atom-ts-transpiler\",\n  \"activationCommands\": {\n    \"atom-workspace\": \"my-package:toggle\"\n  },\n  \"dependencies\": {\n    \"atom-ts-transpiler\": \"^1.5.3\",\n    \"typescript\": \"^4.0.0\"\n  }\n}\n// Then create lib/main.ts:\nexport function activate(state: any) {\n  console.log('Package activated');\n}\nexport function deactivate() {}\nexport function serialize() { return {}; }\n// Run 'apm install' in the package directory.\n// Atom will transpile .ts files on first activation.","lang":"typescript","description":"Configures an Atom package to use atom-ts-transpiler, with a minimal TypeScript entry point."},"warnings":[{"fix":"Consider migrating to VS Code or another editor.","message":"Atom editor is archived and no longer maintained.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use 1.4.3 or >=1.5.1.","message":"Version 1.5.0 was unpublished due to a critical regression causing cache corruption.","severity":"breaking","affected_versions":"1.5.0"},{"fix":"Pin TypeScript to a supported version, e.g., 4.0.x or earlier.","message":"The transpiler requires a TypeScript version >=1.6 and up to 4.x, but may not work with future TypeScript versions.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"rm -rf ~/.atom/compile-cache and restart Atom.","message":"Atom caches transpiled files; after changing tsconfig or typescript version, you may need to clear Atom's cache (~/.atom/compile-cache) to force re-transpilation.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'apm install typescript' in the package directory, or add 'typescript' to the 'dependencies' in package.json.","cause":"TypeScript is not installed as a dependency of the Atom package.","error":"Error: Cannot find module 'typescript'"},{"fix":"Upgrade to atom-ts-transpiler >=1.5.1 or downgrade to 1.4.3.","cause":"Using an incompatible version of atom-ts-transpiler (e.g., 1.5.0 with bug) or incorrect transpiler configuration.","error":"TypeError: transpiler.getCacheKeyData is not a function"},{"fix":"Create a tsconfig.json in the root of your Atom package, or use the 'compilerOptions' property in the transpiler configuration (see docs).","cause":"The transpiler tried to read tsconfig.json but it doesn't exist or is in a different location.","error":"Error: ENOENT: no such file or directory, open '/path/to/tsconfig.json'"},{"fix":"Remove any require('atom-ts-transpiler') calls; only configure it via the 'transpiler' field in package.json.","cause":"Attempting to require('atom-ts-transpiler') and instantiate it manually, which is not the intended usage.","error":"Module build failed: TypeError: transpiler is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}