@knighted/module 1.0.0-alpha.0 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +10 -3
package/README.md CHANGED
@@ -4,14 +4,14 @@
4
4
  [![codecov](https://codecov.io/gh/knightedcodemonkey/module/graph/badge.svg?token=AjayQQxghy)](https://codecov.io/gh/knightedcodemonkey/module)
5
5
  [![NPM version](https://img.shields.io/npm/v/@knighted/module.svg)](https://www.npmjs.com/package/@knighted/module)
6
6
 
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.
8
8
 
9
9
  - ES module ➡️ CommonJS
10
10
  - CommonJS ➡️ ES module
11
11
 
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:
13
13
 
14
- - Module loading transforms, i.e, `import`/`export` converted to `require`/`exports`
14
+ - Converting `import`/`export` to `require`/`exports`
15
15
  - Extensions to be updated in relative specifiers
16
16
  - Write transformed source code to a filename
17
17
 
@@ -41,7 +41,7 @@ const detectCalledFromCli = async path => {
41
41
  detectCalledFromCli(argv[1])
42
42
  ```
43
43
 
44
- You can use transform it to the equivalent CommonJS module
44
+ You can transform it to the equivalent CommonJS module
45
45
 
46
46
  ```js
47
47
  import { transform } from '@knighted/module'
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@knighted/module",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
4
4
  "description": "Converts module differences in source files between ES and CommonJS.",
5
5
  "type": "module",
6
6
  "main": "dist/module.js",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": {
10
- "types": "./dist/types.d.ts",
10
+ "types": "./dist/module.d.ts",
11
11
  "default": "./dist/module.js"
12
12
  },
13
13
  "require": {
14
- "types": "./dist/cjs/types.d.cts",
14
+ "types": "./dist/cjs/module.d.cts",
15
15
  "default": "./dist/cjs/module.cjs"
16
16
  },
17
17
  "default": "./dist/module.js"
@@ -49,6 +49,13 @@
49
49
  ],
50
50
  "author": "KCM <knightedcodemonkey@gmail.com>",
51
51
  "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
+ },
52
59
  "devDependencies": {
53
60
  "@babel/preset-env": "^7.24.6",
54
61
  "@babel/preset-typescript": "^7.24.6",