@integration-app/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.16.77 • Public • Published

Releasing Package

To release a new version of a package (@integration-app/sdk, @integration-app/ui, @integration-app/react), do the following:

  • Go to the package and type npm version -- patch (or npm version -- minor or npm version -- major) to bump the version.
  • Create a PR with the changes.
  • Merge the PR.
  • Run a Github Action to publish a package.

Rollup Configuration

To see the complete configuration, refer to the rollup.config.mjs and rollup.dts.config.mjs files. Although these files are self-explanatory, here's some additional information:

In rollup.config.mjs, we set {external: [/node_modules/]} to exclude our dependencies from being bundled.

Bundle and DTS File Generation Workflow

When using rollup-plugin-dts and @rollup/plugin-typescript in the same configuration, we experienced issues with generating incorrect DTS files. To solve this, we use two Rollup configurations:

  • rollup.config.mjs for generating bundles
  • rollup.dts.config.mjs for generating DTS files.

Build

For build, the following steps are taken:

  • Clean the /dist folder and ./bundle.* files.
  • Rollup with rollup.config.mjs configuration generates bundle files and basic DTS files, which are placed in the dist/dts folder.
  • Rollup with rollup.dts.config.mjs configuration uses the basic DTS files to generate *.d.ts files for each bundle.

Development

During development, the following steps are taken:

  • Run build to generate bundle and DTS files.
    • If not, Rollup with rollup.dts.config.mjs in watch mode fails due to missing DTS files (race condition).
  • Concurrently run two Rollup processes in watch mode:
    • Rollup with rollup.config.mjs configuration to generate bundle files and basic DTS files.
    • Rollup with rollup.dts.config.mjs configuration to generate DTS files for each bundle.

Package.json exports

{
  "exports": {
    "types": "./dist/index.d.ts",       // TypeScript typings for NodeNext modules
    "require": "./dist/index.js",       // used for require() in Node 12+
    "import": "./dist/index.module.mjs" // ESM bundle
  },
  "types": "./dist/index.d.ts",         // TypeScript typings
  "main": "./dist/index.js",            // CommonJS bundle
  "module": "./dist/index.module.mjs",  // ESM bundle
  "unpkg": "./bundle.js",               // UMD bundle
}

Readme

Keywords

none

Package Sidebar

Install

npm i @integration-app/sdk

Weekly Downloads

1,348

Version

0.16.77

License

none

Unpacked Size

4.68 MB

Total Files

289

Last publish

Collaborators

  • seigiard
  • vursul
  • madtaras
  • integration.app