-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and reverting preserveModules
- Loading branch information
1 parent
b1920d6
commit 0013214
Showing
3 changed files
with
879 additions
and
430 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,18 +11,11 @@ | |
"type": "git", | ||
"url": "https://github.com/storyblok/app-extension-auth.git" | ||
}, | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"sideEffects": false, | ||
"files": [ | ||
"dist/" | ||
], | ||
|
@@ -39,15 +32,14 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"jsonwebtoken": "^8.5.1", | ||
"jsonwebtoken": "^9.0.0", | ||
"openid-client": "^5.4.2" | ||
}, | ||
"devDependencies": { | ||
"@jest-mock/express": "^1.4.5", | ||
"@rollup/plugin-commonjs": "21.0.1", | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-node-resolve": "13.1.3", | ||
"@rollup/plugin-typescript": "8.3.2", | ||
"@types/cookie": "^0.5.1", | ||
"@types/cookies": "^0.7.7", | ||
"@types/jest": "^27.4.1", | ||
|
@@ -66,15 +58,13 @@ | |
"node-mocks-http": "1.12.1", | ||
"prettier": "^2.7.1", | ||
"require": "^2.4.20", | ||
"rollup": "^2.78.0", | ||
"rollup-plugin-dts": "4.2.1", | ||
"rollup": "^3.22.0", | ||
"rollup-plugin-filesize": "^10.0.0", | ||
"rollup-plugin-peer-deps-external": "2.2.4", | ||
"rollup-plugin-rename": "^1.0.1", | ||
"rollup-plugin-summary": "^1.4.3", | ||
"rollup-plugin-typescript2": "^0.31.1", | ||
"rollup-plugin-visualizer": "^5.6.0", | ||
"rollup-plugin-typescript2": "^0.34.1", | ||
"rollup-plugin-visualizer": "^5.9.0", | ||
"ts-jest": "^27.1.4", | ||
"tsutils": "^3.21.0", | ||
"typescript": "^4.8.3" | ||
"typescript": "^5.0.4" | ||
} | ||
} |
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,49 +1,34 @@ | ||
import typescript from 'rollup-plugin-typescript2' | ||
import resolve from '@rollup/plugin-node-resolve' | ||
import external from 'rollup-plugin-peer-deps-external' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import { visualizer } from 'rollup-plugin-visualizer' | ||
import summary from 'rollup-plugin-summary' | ||
import json from '@rollup/plugin-json' | ||
import pkg from './package.json' | ||
|
||
const externalPackages = [ | ||
...Object.keys(pkg.peerDependencies ?? {}), | ||
...Object.keys(pkg.dependencies ?? {}), | ||
] | ||
// Creating regexes of the packages to make sure subpaths of the | ||
// packages are also treated as external | ||
const regexesOfPackages = externalPackages.map( | ||
(packageName) => new RegExp(`^${packageName}(/.*)?`), | ||
) | ||
import packageJson from './package.json' assert { type: 'json' } | ||
import filesize from 'rollup-plugin-filesize' | ||
|
||
/** @type {import('rollup').RollupOptions} */ | ||
export default { | ||
input: `./src/index.ts`, | ||
external: regexesOfPackages, | ||
output: [ | ||
{ | ||
format: 'commonjs', | ||
preserveModules: true, | ||
preserveModulesRoot: 'src', | ||
dir: 'dist', | ||
entryFileNames: '[name].cjs', | ||
file: packageJson.module, | ||
format: 'esm', | ||
sourcemap: true, | ||
}, | ||
{ | ||
format: 'es', | ||
preserveModules: true, | ||
preserveModulesRoot: 'src', | ||
dir: 'dist', | ||
entryFileNames: '[name].mjs', | ||
file: packageJson.main, | ||
format: 'cjs', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
external(), | ||
resolve(), | ||
json(), | ||
commonjs(), | ||
typescript(), | ||
summary(), | ||
visualizer(), | ||
filesize(), | ||
], | ||
} |
Oops, something went wrong.