Skip to content

Commit

Permalink
version upgrade
Browse files Browse the repository at this point in the history
* version upgrade 3.0.1 > 3.0.2
* bundle file extension change
  * cjs/index.js > cjs/index.cjs
  * esm/index.js > esm/index.mjs
* production build apply terser
* axios version fixed: 1.1.3
  * axios/axios#5346
  • Loading branch information
imjuni committed Dec 11, 2022
1 parent fe52e76 commit b74401b
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .configs/just.config.ts
Expand Up @@ -51,7 +51,7 @@ task('+rollup:dev', async () => {

task('+rollup:prod', async () => {
const cmd = 'rollup';
const option = '--config ./.configs/rollup.config.prod.ts --configPlugin ts';
const option = '--config ./.configs/rollup.config.prod.ts --configPlugin ts --bundleConfigAsCjs';

logger.info('Rollup: ', cmd, option);

Expand Down
4 changes: 2 additions & 2 deletions .configs/rollup.config.dev.ts
Expand Up @@ -10,12 +10,12 @@ export default [
output: [
{
format: 'cjs',
file: 'dist/cjs/index.js',
file: 'dist/cjs/index.cjs',
sourcemap: true,
},
{
format: 'esm',
file: 'dist/esm/index.js',
file: 'dist/esm/index.mjs',
sourcemap: true,
},
],
Expand Down
14 changes: 9 additions & 5 deletions .configs/rollup.config.prod.ts
@@ -1,4 +1,5 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import readPackage from 'read-pkg';
import ts from 'rollup-plugin-ts';

Expand All @@ -10,13 +11,13 @@ export default [
output: [
{
format: 'cjs',
file: 'dist/cjs/index.js',
sourcemap: true,
file: 'dist/cjs/index.cjs',
sourcemap: false,
},
{
format: 'esm',
file: 'dist/esm/index.js',
sourcemap: true,
file: 'dist/esm/index.mjs',
sourcemap: false,
},
],
plugins: [
Expand All @@ -29,7 +30,10 @@ export default [
pkg?.peerDependencies?.[module] == null;
},
}),
ts({ tsconfig: 'tsconfig.prod.json' }),
ts({
tsconfig: 'tsconfig.prod.json',
}),
terser(),
],
},
];
97 changes: 33 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "jin-frame",
"version": "3.0.1",
"version": "3.0.2",
"description": "Reusable HTTP API request definition library",
"scripts": {
"debug": "node --inspect-brk -r ts-node/register ./node_modules/jest/bin/jest --no-cache --runInBand --detectOpenHandles",
Expand Down Expand Up @@ -41,15 +41,22 @@
"bugs": {
"url": "https://github.com/imjuni/jin-frame/issues"
},
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"typings": "./dist/typings/index.d.ts",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.mjs",
"typings": "./dist/esm/index.d.mts",
"exports": {
".": {
"require": "./dist/cjs/index.cjs",
"import": "./dist/esm/index.mjs",
"typings": "./dist/esm/index.d.mts"
}
},
"files": [
"dist"
],
"homepage": "https://imjuni.github.io/jin-frame",
"dependencies": {
"axios": "^1.2.1",
"axios": "1.1.3",
"dot-prop": "^6.0.1",
"fast-safe-stringify": "^2.1.1",
"form-data": "^4.0.0",
Expand All @@ -63,6 +70,7 @@
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.2.0",
"@tsconfig/node14": "^1.0.3",
"@types/clone-deep": "^4.0.1",
"@types/debug": "^4.1.7",
Expand All @@ -77,7 +85,6 @@
"debug": "^4.3.4",
"deps-diff": "^1.0.1",
"eslint": "^8.29.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -98,7 +105,6 @@
"read-pkg": "^5.2.0",
"rimraf": "^3.0.2",
"rollup": "^3.7.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.0.2",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
Expand All @@ -111,4 +117,4 @@
"directories": {
"test": "test"
}
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Expand Up @@ -11,8 +11,8 @@
"DOM"
],
"declaration": true,
"declarationDir": "dist/typings",
"declarationMap": true,
// "declarationDir": "dist/typings",
// "declarationMap": true,
"sourceMap": true,
"removeComments": false,
"importHelpers": false,
Expand Down

0 comments on commit b74401b

Please sign in to comment.