MCPcopy Index your code
hub / github.com/K-FOSS/TS-ESNode

github.com/K-FOSS/TS-ESNode @v2.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.3 ↗ · + Follow
171 symbols 427 edges 85 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TS-ESNode

semantic-release [Code Quality code style: prettier Libraries.io dependency status for latest release, scoped npm package Conventional Commits Dependabot

This is a Node.JS Loader hook for Node.JS 13.9 or newer that transpiles TypeScript files into JavaScript using the getFormat, resolve, and transformSource hooks.

For Node.JS use npm install @k-foss/ts-esnode@latest

Usage

You should already have "type": "module" in your package.json

Install @k-foss/ts-esnode

Create a dev script in package.json

{
  "scripts": {
    "dev": "node --loader @k-foss/ts-esnode --experimental-specifier-resolution=node ./src/index.ts",
  }
}

Now when you run npm run dev then you should be running your TypeScript source without having to transpile it while still retaining Node.JS ESModule & ESNext module mode.

Development

Setting up the development container

Follow these steps to open this project in a container:

  1. If this is your first time using a development container, please follow the getting started steps.

  2. To use this repository, you can either open the repository in an isolated Docker volume:

  3. Press F1 and select the Remote-Containers: Open Repository in Container... command.

  4. Enter K-FOSS/TS-ESNode
  5. The VS Code window (instance) will reload, clone the source code, and start building the dev container. A progress notification provides status updates.

Or open a locally cloned copy of the code:

  • Clone this repository to your local filesystem.
    • git clone https://github.com/K-FOSS/TS-ESNode.git
  • Open the project folder in Visual Studio Code.
    • code ./TS-ESNode
  • Reopen in Container

    • When you open the project folder in Visual Studio Code you should be prompted with a notification asking if you would like to reopen in container.

    Or manually reopen

    • Press F1 and select the "Remote-Containers: Open Folder in Container..." command.

TODO

  • Worker Threads to avoid the TypeScript compiling affecting main thread.

  • Performance improvements. (Better file/import finding.)

Testing

MUST HAVE NODE.JS v13.9 or newer

To try this out, clone repo

Install NPM modules

npm install

Run all tests under ./Testing/Tests/

npm test

All tests are run on all commits and PRs.

Style

This project currently uses Prettier for code styling and automatic formatting. Prettier is run on every commit and pull request.

Run Prettier

npm run prettier

Linting

This project currently uses ESLint for code linting. ESLint is run on every commits and pull request.

Run ESLint

npm run lint

Dependency Management

Dependency Management for TS-ESNode is handled by automated pull requests created by Dependabot. When new released of development Dependencies are released Dependabot automatically creates a pull request for upgrading to the new version. If the created pull request passes the GitHub Actions testing, prettier/styling, and linting I will merge the pull request.

Releases

@K-FOSS/TS-ESNode uses semantic-release to intelligently automate the creation of a changelog, automatic package publish to NPM, along with creating a GitHub release and tag.

Semantic-Release is currently configured to analyze commits with the Conventional Commits preset to determine if and how the package version should be incremented and if a release should be published, which is why it is important to mantain the Conventional Commits spec for all commits.

Extension points exported contracts — how you extend this code

FileRule (Interface)
(no doc)
src/findFiles.ts
ResolveContext (Interface)
(no doc)
src/types.ts
TestFolder (Interface)
(no doc)
Testing/Runner/Utils/findTests.ts
RouteModule (Interface)
(no doc)
Testing/Tests/Fastify/src/Library/Fastify.ts
LoadContext (Interface)
(no doc)
src/types.ts
LoadResponse (Interface)
(no doc)
src/types.ts
ResolveResponse (Interface)
(no doc)
src/types.ts
TransformContext (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

resolve
called by 13
src/index.ts
resolvePath
called by 10
Testing/Runner/Utils/resolvePath.ts
add
called by 4
Testing/Tests/JSNonExtPaths/src/Utils/Math.ts
findFiles
called by 3
src/findFiles.ts
run
called by 3
Testing/Runner/Utils/run.ts
divide
called by 3
Testing/Tests/JSNonExtPaths/src/Utils/Math.ts
getTSConfig
called by 2
src/Utils.ts
renderModule
called by 2
Testing/Tests/TSConfig/src/Render.tsx

Shape

Function 68
Class 61
Method 29
Interface 13

Languages

TypeScript100%

Modules by API surface

src/types.ts10 symbols
Testing/Tests/Fastify/src/Library/Fastify.ts7 symbols
src/index.ts6 symbols
bin/Utils/Logging/index.ts4 symbols
src/findFiles.ts3 symbols
src/findFiles.test.ts3 symbols
Testing/Tests/folderImport/src/Modules/Hello/Hello.test.ts3 symbols
Testing/Tests/folderImport/src/FolderImport.test.ts3 symbols
Testing/Tests/Winston/src/WinstonSuite.test.ts3 symbols
Testing/Tests/Template/src/TemplateSuite.test.ts3 symbols
Testing/Tests/TSNonExtPaths/src/TSNonExtPaths.test.ts3 symbols
Testing/Tests/TSNonExtPaths/src/Module/Random/Random.test.ts3 symbols

For agents

$ claude mcp add TS-ESNode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact