Skip to content

chore(js): include parser-idl-v2, types, util packages into sails-js build#1220

Merged
osipov-mit merged 3 commits intomaster-idl-v2from
do-js-build
Feb 27, 2026
Merged

chore(js): include parser-idl-v2, types, util packages into sails-js build#1220
osipov-mit merged 3 commits intomaster-idl-v2from
do-js-build

Conversation

@osipov-mit
Copy link
Member

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @osipov-mit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the build and module management for the sails-js package by integrating its related sub-packages (parser-idl-v2, types, util) directly into its build output. This involves significant adjustments to package configurations, Rollup settings, and internal import paths to ensure these modules are properly bundled and their type declarations are generated and exposed, ultimately simplifying the consumption of these modules within the main sails-js package.

Highlights

  • Dependency Updates: The sails-rs dependency version was updated to 0.10.2 in js/config.json, and the root packageManager (pnpm) version was updated to 10.30.2.
  • Module Integration and Export Configuration: The js/package.json was updated to include new exports for ./parser, ./types, and ./util, allowing these modules to be directly consumed from the sails-js package. Corresponding optionalDependencies and dependencies for sails-js-types and sails-js-util were removed, indicating a shift towards internal bundling.
  • Build Process Enhancements: Rollup configuration (js/rollup.config.js) was significantly modified to include src/parser.ts and src/util.ts in the main build inputs. A new rollup-plugin-dts was added, and specific Rollup configurations were introduced to generate type declaration files (.d.ts) for parser, types, and util by sourcing them from their respective node_modules paths. The resolveOnly filter in Rollup was also simplified.
  • Internal Module Refactoring: New files js/src/parser.ts, js/src/types.ts, and js/src/util.ts were added to re-export content from sails-js-parser-idl-v2, sails-js-types, and sails-js-util respectively. This change, along with updated import paths across several core files (e.g., query-builder-with-header.ts, sails-idl-v2.ts, sails.ts), centralizes module resolution within the sails-js package.
  • TypeScript Configuration: The js/tsconfig.build.json was updated to include paths mapping for sails-js-parser-idl-v2, sails-js-types, and sails-js-util to their local src/index.ts files, improving TypeScript's ability to resolve these internal workspace packages.
  • Package Privacy and Build Scripts: The sails-js-parser-idl-v2, sails-js-types, and sails-js-util packages were marked as private in their respective package.json files, and their pack-build scripts were removed. The root package.json also gained a build:parser-idl-v2 script and an updated clean script to manage new lib directories.
Changelog
  • js/config.json
    • Updated sails-rs dependency version from 0.9.2 to 0.10.2.
  • js/package.json
    • Added new exports entries for ./parser, ./types, and ./util.
    • Removed optionalDependencies for sails-js-types and dependencies for sails-js-util.
    • Added rollup-plugin-dts to devDependencies.
  • js/parser-idl-v2/package.json
    • Marked package as private.
    • Removed the pack-build script.
  • js/rollup.config.js
    • Imported dts plugin.
    • Expanded input files for main build to include src/parser.ts and src/util.ts.
    • Simplified the resolveOnly filter in nodeResolve plugin.
    • Added new Rollup configurations to generate type declaration files for parser, types, and util.
  • js/src/index.ts
    • Reordered existing exports for better organization.
  • js/src/parser.ts
    • Added a new file to re-export all from sails-js-parser-idl-v2.
  • js/src/query-builder-with-header.ts
    • Updated the import path for SailsMessageHeader to use the local ./parser.js.
  • js/src/query-builder.ts
    • Reordered import statements.
  • js/src/sails-idl-v2.ts
    • Updated import paths for sails-js-types and sails-js-parser-idl-v2 to use local ./types.js and ./parser.js.
  • js/src/sails.ts
    • Updated import paths for ISailsIdlParser, ISailsProgram, ISailsService, and ISailsTypeDef to use local ./types.js.
  • js/src/transaction-builder-with-header.ts
    • Updated the import path for SailsMessageHeader to use the local ./parser.js.
  • js/src/transaction-builder.ts
    • Reordered import statements.
  • js/src/type-resolver-idl-v2.ts
    • Updated import paths for TypeDecl, Type, and IStructField to use local ./types.js.
  • js/src/types.ts
    • Added a new file to re-export all from sails-js-types.
  • js/src/util.ts
    • Added a new file to re-export all from sails-js-util.
  • js/src/utils.ts
    • Reordered import statements.
  • js/tsconfig.build.json
    • Added paths configuration for sails-js-parser-idl-v2, sails-js-types, and sails-js-util to map to their local source files.
  • js/tsconfig.cjs.json
    • Added a trailing comma to the compilerOptions object for consistent formatting.
  • js/types/package.json
    • Marked package as private.
    • Removed the pack-build script.
  • js/util/package.json
    • Marked package as private.
    • Removed the pack-build script.
  • package.json
    • Updated packageManager version from pnpm@10.28.2 to pnpm@10.30.2.
    • Added build:parser-idl-v2 script.
    • Updated the clean script to include new lib directories for parser-idl-v2, types, and util.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/js-ci.yml
    • .github/workflows/js-release.yml
Activity
  • No specific activity or comments were recorded for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the build process for sails-js to bundle the parser-idl-v2, types, and util packages. This is achieved by updating the package.json exports, adding new entry points, and adjusting the Rollup and TypeScript configurations. The changes are consistent and well-executed. I've provided one suggestion to improve the maintainability and efficiency of the Rollup configuration by avoiding the generation and subsequent overwriting of declaration files.

@osipov-mit osipov-mit merged commit 440705e into master-idl-v2 Feb 27, 2026
2 checks passed
@osipov-mit osipov-mit deleted the do-js-build branch February 27, 2026 08:54
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.

2 participants