-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: http-mock-gen and utils package add "type": "module" as default
- Loading branch information
1 parent
18dc13f
commit e616e6f
Showing
25 changed files
with
97 additions
and
27 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
const { commandCodeGenCli } = require('../lib/index.cjs'); | ||
const { version } = require('../package.json'); | ||
|
||
commandCodeGenCli(version); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/usr/bin/env node | ||
const { commandCodeGenCli } = require('../lib/index.cjs'); | ||
import { createRequire } from 'node:module'; | ||
import { commandCodeGenCli } from '../lib/index.js'; | ||
|
||
const require = createRequire(import.meta.url); | ||
const { version } = require('../package.json'); | ||
|
||
commandCodeGenCli(version); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,21 @@ | |
}, | ||
"license": "MIT", | ||
"author": "liangsky <[email protected]>", | ||
"main": "./lib/index.cjs.js", | ||
"module": "./lib/index.esm.js", | ||
"type": "module", | ||
"main": "./lib/index.cjs", | ||
"module": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"typings": "./lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./lib/index.d.ts", | ||
"import": "./lib/index.js", | ||
"require": "./lib/index.cjs" | ||
} | ||
}, | ||
"bin": { | ||
"http-mock-gen": "bin/index.js" | ||
"http-mock-gen": "bin/index.js", | ||
"http-mock-gen-cjs": "bin/index.cjs" | ||
}, | ||
"files": [ | ||
"lib", | ||
|
@@ -35,7 +44,7 @@ | |
"scripts": { | ||
"test": "vitest run", | ||
"coverage": "vitest run --coverage", | ||
"build": "rollup --bundleConfigAsCjs --config=./rollup.config.js", | ||
"build": "rollup --config=./rollup.config.js", | ||
"update:deps": "pnpm update --interactive --latest" | ||
}, | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletion
17
packages/http-mock-gen/test/cli/__snapshots__/cli.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/http-mock-gen/test/gen/file/gen-interface-mock-data.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/http-mock-gen/test/gen/file/gen-mock-data-json.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,18 @@ | |
}, | ||
"license": "MIT", | ||
"author": "liangsky <[email protected]>", | ||
"main": "./lib/index.cjs.js", | ||
"module": "./lib/index.esm.js", | ||
"type": "module", | ||
"main": "./lib/index.cjs", | ||
"module": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"typings": "./lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./lib/index.d.ts", | ||
"import": "./lib/index.js", | ||
"require": "./lib/index.cjs" | ||
} | ||
}, | ||
"files": [ | ||
"lib", | ||
"CHANGELOG.md", | ||
|
@@ -27,7 +35,7 @@ | |
"scripts": { | ||
"test": "vitest run", | ||
"coverage": "vitest run --coverage", | ||
"build": "rollup --bundleConfigAsCjs --config=./rollup.config.js", | ||
"build": "rollup --config=./rollup.config.js", | ||
"update:deps": "pnpm update --interactive --latest" | ||
}, | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import { getConfig } from '../rollup.base.config'; | ||
import packageJSON from './package.json'; | ||
import { createRequire } from 'node:module'; | ||
import { getConfig } from '../rollup.base.config.js'; | ||
|
||
const require = createRequire(import.meta.url); | ||
const packageJSON = require('./package.json'); | ||
|
||
export default [getConfig(packageJSON)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.