You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

esm-loader-typescript

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esm-loader-typescript - npm Package Compare versions

Comparing version

to
1.0.2

35

package.json
{
"name": "esm-loader-typescript",
"version": "1.0.1",
"version": "1.0.2",
"description": "Chainable ESModule Loader for Typescript",

@@ -18,18 +18,18 @@ "homepage": "https://github.com/brev/esm-loaders/tree/main/packages/esm-loader-typescript#readme",

"dependencies": {
"create-esm-loader": "^0.1.1",
"semver": "^7.3.5",
"create-esm-loader": "^0.1.2",
"npm-run-all": "^4.1.5",
"semver": "^7.3.7",
"tsconfig": "^7.0.0",
"typescript": "^4.5.4"
"typescript": "^4.8.2"
},
"devDependencies": {
"@types/node": "^17.0.17",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"c8": "^7.11.0",
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"@types/node": "^18.7.14",
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"c8": "^7.12.0",
"eslint": "^8.23.0",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"uvu": "^0.5.3"
"uvu": "^0.5.6"
},

@@ -57,10 +57,9 @@ "files": [

"build": "tsc",
"build:watch": "run-s 'build -- --watch'",
"build:watch": "run-s 'build --watch'",
"clean": "rimraf coverage/ dist/",
"format": "run-s 'bin:prettier -- --write'",
"lint": "run-s 'bin:prettier -- --check' bin:eslint",
"format": "run-s 'bin:prettier --write'",
"lint": "run-s 'bin:prettier --check' bin:eslint",
"test": "run-s build bin:uvu",
"test:cover": "c8 run-s test"
},
"readme": "# esm-loader-typescript\n\n[Node.js ESModule Loader][node-loaders] for importing and loading\nTypescript (`.ts`) files and transpiling on the fly.\n\n**Warning!** Using experimental Node.js features and flags,\nAPI will likely change. This may be helpful for development and testing,\nbut should not be used in production.\n\n# Usage\n\n```sh\nnpm install --save-dev esm-loader-typescript\n```\n\nWe want to import a `.ts` file with Node.js:\n\n```ts\n// index.ts\nconst words: string = 'hello'\nconsole.log(words)\n// 'hello'\n```\n\n## Config\n\nIf a `tsconfig.json` file is found, it will be loaded and used. Otherwise, we\nprovide a bare-bones default config which will be used instead.\n\n## Standalone\n\n```sh\nNODE_OPTIONS=\"--experimental-loader esm-loader-typescript\" node index.ts\n```\n\n## Chainable\n\nThis loader can be configured, and chained with other loaders, using\n[node-esm-loader][node-esm-loader]. This should be your only loader handling\nTypescript files.\n\n```sh\nnpm install --save-dev node-esm-loader\n```\n\n```js\n// .loaderrc.js\nexport default {\n loaders: ['esm-loader-typescript'],\n}\n```\n\n```sh\nNODE_OPTIONS=\"--experimental-loader node-esm-loader\" node index.ts\n```\n\n### Option: Debug\n\n```js\n// .loaderrc.js\nexport default {\n loaders: [\n {\n loader: 'esm-loader-typescript',\n options: {\n debug: true,\n },\n },\n ],\n}\n```\n\n## Related\n\n- [esm-loader-import-relative-add-extension][esm-loader-import-relative-add-extension]:\n Typescript usually generates `.js` files, so relative imports are suggested\n to have no file extension. But in our case, since we're transpiling\n on-the-fly, these extensionless imports leave Node.js confused. Use this\n loader to add `.ts` extensions to any relative imports which are missing\n them, allowing Node.js to resolve and load the files.\n\n# License\n\n[MIT][mit-license]\n\n[esm-loader-import-relative-add-extension]: https://github.com/brev/esm-loader-import-relative-add-extension\n[mit-license]: https://mit-license.org/\n[node-esm-loader]: https://github.com/sebamarynissen/node-esm-loader#readme\n[node-loaders]: https://nodejs.org/api/esm.html#loaders\n"
}
}

@@ -25,7 +25,2 @@ # esm-loader-typescript

## Config
If a `tsconfig.json` file is found, it will be loaded and used. Otherwise, we
provide a bare-bones default config which will be used instead.
## Standalone

@@ -40,4 +35,3 @@

This loader can be configured, and chained with other loaders, using
[node-esm-loader][node-esm-loader]. This should be your only loader handling
Typescript files.
[node-esm-loader][node-esm-loader].

@@ -59,4 +53,6 @@ ```sh

### Option: Debug
### Options
#### Debug
```js

@@ -76,4 +72,9 @@ // .loaderrc.js

## Related
# Config
If a `tsconfig.json` file is found, it will be loaded and used. Otherwise, we
provide a bare-bones default config which will be used instead.
# Related
- [esm-loader-import-relative-add-extension][esm-loader-import-relative-add-extension]:

@@ -90,5 +91,5 @@ Typescript usually generates `.js` files, so relative imports are suggested

[esm-loader-import-relative-add-extension]: https://github.com/brev/esm-loader-import-relative-add-extension
[esm-loader-import-relative-add-extension]: https://github.com/brev/esm-loaders/tree/main/packages/esm-loader-import-relative-add-extension#readme
[mit-license]: https://mit-license.org/
[node-esm-loader]: https://github.com/sebamarynissen/node-esm-loader#readme
[node-loaders]: https://nodejs.org/api/esm.html#loaders