TS-ESNode
ts-node
Our great sponsors
TS-ESNode | ts-node | |
---|---|---|
2 | 20 | |
37 | 12,562 | |
- | 0.9% | |
6.0 | 5.5 | |
5 months ago | 2 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
TS-ESNode
-
Hello Yarn 2, Goodbye node_modules
CommonJS is a great module system if you're using JS for scripting Unix (which it excels at). Is there a good reason to use ESM though? I've been half-joking that it's the "extinguish" phase of Microsoft's EEE strategy for JS.
I know one legitimate reason is "tree shaking" (source-level LTO when bundling modules). Dumber, static import/export statements probably simplify that in some way. However ESM destroys the isomorphism between JS modules and the filesystem.
One change that ES modules introduced, I think, for no other reason than to be backwards incompatible, is changing the behavior of the default export (`export default foo` transpiles down to `module.exports.default = foo` instead of `module.exports = foo`).
Other "ohai guys this is the new normal now" kinds of changes are making the dynamic imports async-only (after not supporting them for a while) as well as changing the behavior of module resolution.
And the cherry on top is called TS-ESNode: https://github.com/K-FOSS/TS-ESNode because TypeScript modules and ESM are the same thing yet you need to somehow find this third-party shim which is required for them to work together at all. It's enabled by wrapping the interpreter, just like Yarn2's new dependency resolution.
- easy way to reduce RAM consumption when using ts-node
ts-node
-
TypeScript Without Transpilation
I thought this was going to be a project like ts-node [1]
[1] https://github.com/TypeStrong/ts-node
- Is your language eco friendly?
-
Deploy a static site to AWS S3 and CloudFront using AWS CDK
The command specified in the app option uses ts-node by default, which is an execution engine for Node.js that allows you to run TypeScript code directly. The --prefer-ts-exts flag prevents ts-node from prioritizing precompiled .js files and will always import the TypeScript source code instead, if it is available. This is useful if you are also using tsc (the TypeScript compiler) alongside the app option. The bin/cdk.ts file is the entry point for our CDK app, which defines the main function that will be executed when the app is run.
- Use tsx instead of nodemon
-
Couple super basic Typescript questions from a newbie: how to compile and how to start learning
If you want to write apps that run on Node.js I would suggest using Google’s TypeScript style guide. You can start using it by simply running npx gts init. I’d suggest that you start with this and run your apps using ts-node/ts-node-dev because it does not require an extra build step.
-
Looking for a TS REPL/tinkering tool, any recommendations?
ts-node (“TypeScript execution and REPL for Node.js”)
-
"SyntaxError: Cannot use import statement outside a module" trying to run Mathigon/Studio
Here is a relevant discussion and dev comment: https://github.com/TypeStrong/ts-node/issues/155
-
An Introduction to Deno: Is It Better Than Node.js?
It does support ESM, with a --loader[1], but even with its SWC option it’s still significantly slower than the esbuild loader I’m working on. Unfortunately, esbuild isn’t totally compatible with tsc, so it’s not a drop-in replacement without plugins.
1: https://github.com/TypeStrong/ts-node#native-ecmascript-modu...
-
How to Set Up a Node.js Project with TypeScript
The process of compiling TypeScript source files into JavaScript code before executing them with Node.js can get a little tedious after a while, especially during development. You can eliminate the intermediate steps before running the program through the ts-node CLI to execute .ts files directly. Go ahead and install the ts-node package using the command below:
-
How to use execa@6 with NestJs?
I tried suggested solution by https://github.com/TypeStrong/ts-node/issues/1007 but this causes problem with NestJS decorators:
What are some alternatives?
esbuild-runner - ⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
swc-node - Faster ts-node without typecheck
esno - Alias to `tsx`
esbuild - An extremely fast bundler for the web
volta - Volta: JS Toolchains as Code. ⚡
swc - Rust-based platform for the Web
sucrase - Super-fast alternative to Babel for when you can target modern JS runtimes
vike - 🔨 Like Next.js / Nuxt but as do-one-thing-do-it-well Vite plugin.
TypeScript-Call-Graph - CLI to generate an interactive graph of functions and calls from your TypeScript files
aws-cdk - The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
Next.js - The React Framework