Skip to content

Commit

Permalink
build(deps): update dependency rollup to v3 (#720)
Browse files Browse the repository at this point in the history
* build(deps): update dependency rollup to v3

* build(deps): update rollup integration

* build(deps): update node engine on circleci

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Igo Lapa <[email protected]>
  • Loading branch information
renovate[bot] and Igo Lapa committed May 4, 2023
1 parent 03f6df2 commit 53427d5
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ executors:
node-executor:
working_directory: *working_directory
docker:
- image: circleci/node:14.17.6
- image: cimg/node:14.21

commands:
save_deps_cache:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Javascript client library for the Duffel API",
"main": "dist/index.js",
"module": "dist/index.es.js",
"types": "dist/types/index.d.ts",
"types": "dist/typings.d.ts",
"homepage": "https://duffel.com",
"keywords": [
"duffel"
Expand All @@ -16,7 +16,8 @@
"license": "MIT",
"scripts": {
"generate:operation": "node ./scripts/createOperation.mjs",
"build": "rm -rf dist && rollup -c",
"build": "rm -rf dist && rollup -c && yarn remove-declaration-files",
"remove-declaration-files": "rm -rf dist/types dist/Client.d.ts dist/index.d.ts dist/Resource.d.ts",
"build:test": "rm -rf dist && tsc --noEmit && rollup -c",
"start": "node ./dist/index.js",
"dev": "ts-node ./src/index.ts",
Expand Down Expand Up @@ -63,7 +64,6 @@
"@commitlint/config-angular": "17.4.4",
"@commitlint/cz-commitlint": "17.5.0",
"@rollup/plugin-commonjs": "24.1.0",
"@rollup/plugin-multi-entry": "6.0.0",
"@rollup/plugin-node-resolve": "15.0.2",
"@types/jest": "29.0.3",
"@typescript-eslint/eslint-plugin": "5.35.1",
Expand All @@ -79,8 +79,8 @@
"lint-staged": "13.1.2",
"nock": "13.2.9",
"prettier": "2.8.8",
"rollup": "2.79.1",
"rollup-plugin-dts": "4.2.3",
"rollup": "3.21.3",
"rollup-plugin-dts-bundle": "^1.0.0",
"rollup-plugin-inject-process-env": "1.3.1",
"rollup-plugin-peer-deps-external": "2.2.4",
"rollup-plugin-terser": "7.0.2",
Expand Down
58 changes: 58 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { terser } from 'rollup-plugin-terser'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from 'rollup-plugin-typescript2'
import dtsBundle from 'rollup-plugin-dts-bundle'
import injectProcessEnv from 'rollup-plugin-inject-process-env'
import packageJson from './package.json' assert { type: 'json' }

const globals = {
...packageJson.dependencies,
}

export default [
{
input: 'src/index.ts',
output: [
{
inlineDynamicImports: true,
file: packageJson.main,
format: 'cjs', // commonJS
sourcemap: true,
},
{
inlineDynamicImports: true,
file: packageJson.module,
format: 'es', // ES Modules
sourcemap: true,
},
],
plugins: [
peerDepsExternal(),
resolve({
preferBuiltins: true,
}),
commonjs(),
typescript({
clean: true,
}),
dtsBundle({
bundle: {
name: packageJson.name,
main: 'dist/index.d.ts',
},
verbose: true,
}),
commonjs({
exclude: 'node_modules',
ignoreGlobal: true,
}),
injectProcessEnv({
npm_package_version: packageJson.version,
}),
terser(),
],
external: [...Object.keys(globals)],
},
]
Loading

0 comments on commit 53427d5

Please sign in to comment.