Conversation
|
Hello! How is the TypeScript version going? What are you missing before you can release it? I can use it to maybe give you some feedback if you publish it to npm with any kind of name. (Same for the parallel branch) |
|
Hello @Telokis. |
|
Hello and thank you for the answer! If you can, I'll be happy to test the TypeScript version! It's difficult to find a proper behavior tree library in JS and even more so in TypeScript! (I was asking for parallel/async as well because my real AI will use websockets to perform actions but that can come later, I'll do a synchronous prototype in the first time.) |
Tasks should not start the timer as long as they are running.
|
So I added the parallel branch stuff and this into one release: behaviortree@3.0.0-beta.0 It should be published by now. |
|
I will also test this new support and let you know what I find. :) |
|
@Tresky Thanks, very much for trying it out. You are right, during the publishing step, all files except those mentioned have been omitted. 🤦 But it should work now with the next beta release: behaviortree@3.0.0-beta.1 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Free Tier Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| outfile: 'lib/index.umd.js', | ||
| bundle: true, | ||
| minify: true, | ||
| format: 'esm', |
There was a problem hiding this comment.
UMD build file uses ESM format instead
High Severity
The first esbuild configuration outputs to lib/index.umd.js but specifies format: 'esm'. The filename implies a UMD (Universal Module Definition) bundle, but the actual output is ESM. Consumers expecting a UMD bundle (e.g., for use via a <script> tag in browsers) will get incompatible ESM code. The format option needs to be 'iife' (esbuild doesn't support UMD directly) or the filename corrected to reflect it's ESM.
| .catch((err) => { | ||
| console.error(err); | ||
| process.exit(1); | ||
| }); |
There was a problem hiding this comment.
Esbuild node build output overwritten by tsc
High Severity
The second esbuild config produces lib/index.js (a bundled, minified CJS build targeting node14), but the build pipeline runs tsc immediately after node bin/build.js. Since tsconfig.json has outDir: "lib" without emitDeclarationOnly or noEmit, tsc emits its own unbundled lib/index.js, overwriting esbuild's output. The published lib/index.js (referenced by both main and module in package.json) ends up being raw tsc output rather than the intended bundled build, making this entire esbuild config dead code.



Note
Medium Risk
Moderate risk because it changes the build/test toolchain (esbuild bundling outputs and jest transform), which can affect published artifacts and CI behavior despite minimal runtime code changes.
Overview
Migrates project tooling away from the previous Babel + Standard/Prettier ESLint setup to a TypeScript-first workflow, adding a new
.eslintrc.js(with@typescript-eslint) and ignoringbin/in linting.Introduces an
esbuild-based build script (bin/build.js) that bundlessrc/index.tsintolib/outputs (with sourcemaps/minification and node externals) and configures Jest to compile.ts/.tsxviaesbuild-jest.Updates formatting/config hygiene (
.prettierrcsemicolons + wider lines,.gitignorenow includeslib/, adds VSCode spellings) and refreshesREADME.mdexamples/sections (semicolonized snippets, expanded introspection wording, and a brief built-in node types list + 3.0.0 notes/TODOs).Written by Cursor Bugbot for commit 0f97102. This will update automatically on new commits. Configure here.