Skip to content

Commit

Permalink
update all dependencies to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Keillion committed Sep 3, 2024
1 parent 77d072b commit 70ea0b8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const MutablePromise = require('mutable-promise');
CDN
```html
<script type="module">
import MutablePromise from 'https://cdn.jsdelivr.net/npm/[email protected].8/dist/index.esm.min.js';
import MutablePromise from 'https://cdn.jsdelivr.net/npm/[email protected].14/dist/index.esm.min.js';
</script>
```
```html
<script src="https://cdn.jsdelivr.net/npm/[email protected].8/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/index.min.js"></script>
```

## Example
Expand Down
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"name": "mutable-promise",
"version": "1.1.13",
"version": "1.1.14",
"description": "Wrapper for Promise. Resolvable, rejectable, redirectable.",
"files": [
"/dist",
"/src"
],
"main": "./dist/index.js",
"~~module": "./dist/index.mjs",
"module": "./dist/index.esm.js",
"exports": {
"~~import": "./dist/index.mjs",
"import": "./dist/index.esm.js",
"require": "./dist/index.js"
"import": {
"types":"./dist/types/index.d.ts",
"default":"./dist/index.esm.js"
},
"require": {
"types":"./dist/types/index.d.ts",
"default":"./dist/index.js"
}
},
"sideEffects": false,
"types": "./dist/types/index.d.ts",
Expand All @@ -24,10 +28,10 @@
"test": "node ./test/umd.js && node ./test/esm.mjs"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.1",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.3.1",
"typescript": "^4.6.2"
"@rollup/plugin-typescript": "^11.1.6",
"rollup": "^4.21.2",
"@rollup/plugin-terser": "^0.4.4",
"tslib": "^2.7.0",
"typescript": "^5.5.4"
}
}
12 changes: 6 additions & 6 deletions rollup.config.js → rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import typescript from "@rollup/plugin-typescript";
import terser from "@rollup/plugin-terser";
import fs from 'fs/promises';

// https://rollupjs.org/guide/en/#configuration-files
Expand All @@ -17,8 +17,8 @@ export default async(commandLineArgs)=>{
}
},
};
// https://stackoverflow.com/questions/57360588/how-to-use-terser-with-webpack
const plugin_terser_esnext = terser({ ecma: 6, format: terser_format }); // 8

const plugin_terser_es6 = terser({ ecma: 6, format: terser_format });

return [
{
Expand Down Expand Up @@ -55,7 +55,7 @@ export default async(commandLineArgs)=>{
exports: "default",
sourcemap: true,
plugins: [
plugin_terser_esnext,
plugin_terser_es6,
{
// index.esm.js
// for rollup/webpack to compile together with other, target browser
Expand Down Expand Up @@ -86,7 +86,7 @@ export default async(commandLineArgs)=>{
exports: "default",
sourcemap: true,
plugins: [
plugin_terser_esnext,
plugin_terser_es6,
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion test/esm.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MutablePromise from '../dist/mutable-promise.mjs';
import MutablePromise from '../dist/index.mjs';

console.log('================test esm================');

Expand Down
2 changes: 1 addition & 1 deletion test/umd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const MutablePromise = require('../dist/mutable-promise.js');
const MutablePromise = require('../dist/index.js');

console.log('================test umd================');

Expand Down

0 comments on commit 70ea0b8

Please sign in to comment.