Skip to content

Commit e345ab4

Browse files
fix: types. (#1)
* docs: update readme.
1 parent c2f5fb0 commit e345ab4

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
[![codecov](https://codecov.io/gh/knightedcodemonkey/module/graph/badge.svg?token=AjayQQxghy)](https://codecov.io/gh/knightedcodemonkey/module)
55
[![NPM version](https://img.shields.io/npm/v/@knighted/module.svg)](https://www.npmjs.com/package/@knighted/module)
66

7-
Node.js utility for transforming JavaScript or TypeScript files from one module system to another.
7+
Node.js utility for transforming a JavaScript or TypeScript file from an ES module to CommonJS, or vice versa.
88

99
- ES module ➡️ CommonJS
1010
- CommonJS ➡️ ES module
1111

12-
By default `@knighted/module` transforms globals from one module scope to another and returns the modified source, but it accepts options that allow
12+
By default `@knighted/module` transforms the one-to-one [differences between ES modules and CommonJS](https://nodejs.org/api/esm.html#differences-between-es-modules-and-commonjs), but it also accepts options that allow:
1313

14-
- Module loading transforms, i.e, `import`/`export` converted to `require`/`exports`
14+
- Converting `import`/`export` to `require`/`exports`
1515
- Extensions to be updated in relative specifiers
1616
- Write transformed source code to a filename
1717

@@ -41,7 +41,7 @@ const detectCalledFromCli = async path => {
4141
detectCalledFromCli(argv[1])
4242
```
4343
44-
You can use transform it to the equivalent CommonJS module
44+
You can transform it to the equivalent CommonJS module
4545
4646
```js
4747
import { transform } from '@knighted/module'

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 80.0
6+
threshold: 0.5
7+
patch:
8+
default:
9+
target: 80.0
10+
threshold: 5.0

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "@knighted/module",
3-
"version": "1.0.0-alpha.0",
3+
"version": "1.0.0-alpha.1",
44
"description": "Converts module differences in source files between ES and CommonJS.",
55
"type": "module",
66
"main": "dist/module.js",
77
"exports": {
88
".": {
99
"import": {
10-
"types": "./dist/types.d.ts",
10+
"types": "./dist/module.d.ts",
1111
"default": "./dist/module.js"
1212
},
1313
"require": {
14-
"types": "./dist/cjs/types.d.cts",
14+
"types": "./dist/cjs/module.d.cts",
1515
"default": "./dist/cjs/module.cjs"
1616
},
1717
"default": "./dist/module.js"
@@ -49,6 +49,13 @@
4949
],
5050
"author": "KCM <[email protected]>",
5151
"license": "MIT",
52+
"repository": {
53+
"type": "git",
54+
"url": "https://github.com/knightedcodemonkey/module.git"
55+
},
56+
"bugs": {
57+
"url": "https://github.com/knightedcodemonkey/module/issues"
58+
},
5259
"devDependencies": {
5360
"@babel/preset-env": "^7.24.6",
5461
"@babel/preset-typescript": "^7.24.6",

0 commit comments

Comments
 (0)