Skip to content

Categorize built-ins / expose reserved name built-ins#20

Merged
nikku merged 3 commits intomainfrom
parsability
Feb 10, 2026
Merged

Categorize built-ins / expose reserved name built-ins#20
nikku merged 3 commits intomainfrom
parsability

Conversation

@Buckwich
Copy link
Member

@Buckwich Buckwich commented Feb 9, 2026

Closes #11
Related to camunda/camunda-modeler#3983

Proposed Changes

So far only get or else is an unparsable function. but with this we can detect more in the future.

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Feb 9, 2026
@Buckwich Buckwich marked this pull request as ready for review February 9, 2026 14:08
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Feb 9, 2026
@Buckwich Buckwich requested review from a team, AlekseyManetov, barmac and nikku and removed request for a team and barmac February 9, 2026 14:09
@Buckwich Buckwich changed the title Parsability Cluster builtins into feel native, camunda extensions, and "unparsable" Feb 9, 2026
@Buckwich Buckwich requested review from Copilot February 9, 2026 15:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the exported FEEL builtin collections to separate standard FEEL builtins from Camunda-specific extensions, and adds a build-time step to detect functions that are not parsable by lezer-feel (supporting downstream editor/lint integrations).

Changes:

  • Split exports into feelBuiltins, camundaExtensions, camundaBuiltins (combined), plus unparsableBuiltins.
  • Refactor the builtin compilation task into smaller utilities (markdown parsing, categorization, template writing) and add lezer-feel-based parsability detection.
  • Update README, typings, and tests to reflect the new exports.

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.json Enables skipLibCheck for TS checking.
package.json Adds @bpmn-io/lezer-feel dependency for parsability detection during compilation.
package-lock.json Locks new dependency tree for @bpmn-io/lezer-feel.
tasks/compileBuiltins.js Uses new utils + categorization and writes categorized outputs via template.
tasks/camundaBuiltins.template.js Template now defines separate exports and composes camundaBuiltins.
tasks/utils/index.js Barrel export for the new task utilities.
tasks/utils/markdownParser.js New markdown parsing utility extracted from compile script.
tasks/utils/parseBuiltins.js Updates JSDoc types to use the new markdown parser typedef.
tasks/utils/categorizeBuiltins.js Adds Lezer-based parsability detection and categorization logic.
tasks/utils/templateWriter.js New utility to write categorized lists into the JS template.
src/index.js Exposes the new public exports.
src/camundaBuiltins.js Regenerated output containing split builtin collections and unparsables list.
dist/index.d.ts Updates public typings for new exports.
test/spec/lib/camundaBuiltins.spec.js Adds test coverage for the new exports and relationships.
README.md Documents the new exports and suggested usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments attached, sorry for potential double posts (due to GitHub hick-ups).

@Buckwich Buckwich requested a review from nikku February 10, 2026 10:14
@nikku nikku merged commit 521d57f into main Feb 10, 2026
3 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Feb 10, 2026
@nikku nikku deleted the parsability branch February 10, 2026 22:24
@nikku nikku changed the title Cluster builtins into feel native, camunda extensions, and "unparsable" Categorize builtins / expose reserved name built-ins Feb 10, 2026
@nikku nikku changed the title Categorize builtins / expose reserved name built-ins Categorize built-ins / expose reserved name built-ins Feb 10, 2026
function isParsable(builtin) {
try {
const paramsList = builtin.params?.map((p) => 'null').join(', ') || '';
const expression = `${builtin.name}(${paramsList})`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one ⭐

@nikku
Copy link
Member

nikku commented Feb 10, 2026

Thanks again, released as v0.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate Camunda Extension from default builtins

3 participants