From 6a18b6c8f3bf52c0840dcaeb26af5ef612b55246 Mon Sep 17 00:00:00 2001 From: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Date: Wed, 27 May 2026 16:39:11 -0700 Subject: [PATCH] fix: restore tools/rollup in published package and bump to 2.0.5 The Rush removal (dc4e848) changed rollup/tsconfig.json to output locally instead of into lib/tools/rollup/, causing the tools/rollup directory to be empty at pack time. This broke consumers using @microsoft/dynamicproto-js/tools/rollup. Changes: - Revert rollup/tsconfig.json outDir/declarationDir to ../lib/tools/rollup/ - Revert lib/rollup.config.js import to ./tools/rollup/dist-es5/removeDynamic - Add build:rollup-bundle step to produce ESM/Node bundles and copy package.json - Bump version to 2.0.5 --- RELEASES.md | 11 ++++++++++- docs/typedoc/functions/default.html | 4 ++-- docs/typedoc/interfaces/idynamicprotoopts.html | 6 +++--- lib/package.json | 2 +- lib/rollup.config.js | 2 +- package.json | 5 +++-- rollup/tsconfig.json | 4 ++-- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 283788d..4f21b35 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,6 +1,15 @@ # Releases -## 2.0.4 (TBD) +## 2.0.5 (May 27th, 2026) + +### Bug Fix + +- Fix `tools/rollup` directory missing from published npm package since 2.0.4 + - Restore TypeScript output paths for rollup plugin to `lib/tools/rollup/` + - Add rollup bundle step to produce ESM/Node formats for the rollup plugin + - Ensures `@microsoft/dynamicproto-js/tools/rollup` is available to consumers + +## 2.0.4 (May 27th, 2026) ### Changes diff --git a/docs/typedoc/functions/default.html b/docs/typedoc/functions/default.html index ecf3db2..5fd70e7 100644 --- a/docs/typedoc/functions/default.html +++ b/docs/typedoc/functions/default.html @@ -18,8 +18,8 @@
  • Optionaloptions: IDynamicProtoOpts

    Additional options to configure how the dynamic prototype operates

  • Returns void

    DPType This is the generic type of the class, used to keep intellisense valid

    DPCls The type that contains the prototype of the current class

    -

    Properties

    Properties

    Properties

    Exposes the default global options to allow global configuration, if the global values are disabled these will override any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose their internal usage of dynamic proto.

    -
    +
    diff --git a/docs/typedoc/interfaces/idynamicprotoopts.html b/docs/typedoc/interfaces/idynamicprotoopts.html index 7ea321d..1b3f4ab 100644 --- a/docs/typedoc/interfaces/idynamicprotoopts.html +++ b/docs/typedoc/interfaces/idynamicprotoopts.html @@ -1,8 +1,8 @@ IDynamicProtoOpts | @microsoft/dynamicproto-js

    Interface to define additional configuration options to control how the dynamic prototype functions operate.

    -
    interface IDynamicProtoOpts {
        setInstFuncs: boolean;
        useBaseInst?: boolean;
    }

    Properties

    interface IDynamicProtoOpts {
        setInstFuncs: boolean;
        useBaseInst?: boolean;
    }

    Properties

    setInstFuncs: boolean

    Should the dynamic prototype attempt to set an instance function for instances that do not already have an function of the same name or have been extended by a class with a (non-dynamic proto) prototype function.

    -
    useBaseInst?: boolean

    When looking for base (super) functions if it finds a dynamic proto instances can it use the instance functions +

    useBaseInst?: boolean

    When looking for base (super) functions if it finds a dynamic proto instances can it use the instance functions and bypass the prototype lookups. Defaults to true.

    -
    +
    diff --git a/lib/package.json b/lib/package.json index e5d33e4..4e857a8 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/dynamicproto-js", "author": "Microsoft Application Insights Team", - "version": "2.0.4", + "version": "2.0.5", "description": "Microsoft Dynamic Proto Utility", "keywords": [ "javascript", diff --git a/lib/rollup.config.js b/lib/rollup.config.js index 4066254..0c5778e 100644 --- a/lib/rollup.config.js +++ b/lib/rollup.config.js @@ -3,7 +3,7 @@ import copy from "rollup-plugin-copy"; import replace from "@rollup/plugin-replace"; import minify from 'rollup-plugin-minify-es'; import cleanup from "rollup-plugin-cleanup"; -import dynamicRemove from "../rollup/dist-es5/removeDynamic"; +import dynamicRemove from "./tools/rollup/dist-es5/removeDynamic"; import { es3Check, es3Poly } from "@microsoft/applicationinsights-rollup-es3"; const UglifyJs = require('uglify-js'); diff --git a/package.json b/package.json index e93cdcb..523c20a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/dynamicproto-js", "description": "Microsoft Dynamic Proto Utility", - "version": "2.0.4", + "version": "2.0.5", "keywords": [ "javascript", "dynamic prototype", @@ -18,9 +18,10 @@ "doc": "lib/docs" }, "scripts": { - "build": "npm run build:rollup-plugin && grunt dynamicproto && npm run build:bundle && npm run docs", + "build": "npm run build:rollup-plugin && grunt dynamicproto && npm run build:bundle && npm run build:rollup-bundle && npm run docs", "build:rollup-plugin": "cd rollup && npx tsc -p tsconfig.json", "build:bundle": "cd lib && rollup -c rollup.config.js --bundleConfigAsCjs", + "build:rollup-bundle": "cd rollup && rollup -c rollup.config.js --bundleConfigAsCjs && cd .. && node -e \"require('fs').cpSync('rollup/package.json','lib/tools/rollup/package.json')\"", "test": "grunt dynamicprototest", "rollup": "grunt rollup", "lint": "grunt lint", diff --git a/rollup/tsconfig.json b/rollup/tsconfig.json index 7021006..df78f20 100644 --- a/rollup/tsconfig.json +++ b/rollup/tsconfig.json @@ -11,9 +11,9 @@ "noEmitHelpers": false, "alwaysStrict": true, "declaration": true, - "declarationDir": "./types", + "declarationDir": "../lib/tools/rollup/types", "rootDir": "./src", - "outDir": "./dist-es5", + "outDir": "../lib/tools/rollup/dist-es5", "suppressImplicitAnyIndexErrors": true, "allowSyntheticDefaultImports": true, "removeComments": false,