| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent afc87c2 commit 1fd1395
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,7 +133,7 @@ module. This can be one of the following: | |||
| 133 | 133 | | `format` | Description | | |
| 134 | 134 | | --- | --- | | |
| 135 | 135 | | `"esm"` | Load a standard JavaScript module | | |
| 136 | - | `"commonjs"` | Load a node-style CommonJS module | | ||
| 136 | + | `"cjs"` | Load a node-style CommonJS module | | ||
| 137 | 137 | | `"builtin"` | Load a node builtin CommonJS module | | |
| 138 | 138 | | `"json"` | Load a JSON file | | |
| 139 | 139 | | `"addon"` | Load a [C++ Addon][addons] | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,7 +44,7 @@ const extensionFormatMap = { | |||
| 44 | 44 | '.mjs': 'esm', | |
| 45 | 45 | '.json': 'json', | |
| 46 | 46 | '.node': 'addon', | |
| 47 | - '.js': 'commonjs' | ||
| 47 | + '.js': 'cjs' | ||
| 48 | 48 | }; | |
| 49 | 49 | ||
| 50 | 50 | function resolve(specifier, parentURL) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ translators.set('esm', async (url) => { | |||
| 32 | 32 | // Strategy for loading a node-style CommonJS module | |
| 33 | 33 | const isWindows = process.platform === 'win32'; | |
| 34 | 34 | const winSepRegEx = /\//g; | |
| 35 | - translators.set('commonjs', async (url) => { | ||
| 35 | + translators.set('cjs', async (url) => { | ||
| 36 | 36 | debug(`Translating CJSModule ${url}`); | |
| 37 | 37 | const pathname = internalURLModule.getPathFromURL(new URL(url)); | |
| 38 | 38 | const module = CJSModule._cache[ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments