Skip to content

Enforce exact import version constraints matching package.json - #78

Merged
forevermatt merged 12 commits into
mainfrom
copilot/fix-import-version-constraints
Aug 26, 2026
Merged

forevermatt merged 12 commits into
mainfrom
copilot/fix-import-version-constraints

Conversation

Copilot AI commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Import specifiers in several JS files used version constraints that didn't match package.json (or had none at all), meaning automated tests could run against different package versions than Pipedream uses in production.


Added

  • Add check to CI workflow to ensure package.json and import statement versions match
  • Also fail CI on (non-built-in) imported dependencies not in package.json

Fixed

  • Fix import statements that didn't match package.json file
  • Add @pipedream/platform to package.json, pinned at caret-major-version
  • Add ssh2-sftp-client to package.json and pin everywhere at ^12
  • Fix our loader's mocking of @pipedream/platform for tests

PR checklist:

  • Add/update test(s) for any new/changed actions
  • Bump version number of any changed actions
  • Update README.md

… job

Co-authored-by: forevermatt <6233204+forevermatt@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix import statements to include version constraints Enforce exact import version constraints matching package.json Aug 19, 2026
Copilot AI requested a review from forevermatt August 19, 2026 16:34
Copilot AI and others added 2 commits August 19, 2026 19:26
…ersions.mjs

Co-authored-by: forevermatt <6233204+forevermatt@users.noreply.github.com>
Co-authored-by: forevermatt <6233204+forevermatt@users.noreply.github.com>
…port_versions.mjs

Co-authored-by: forevermatt <6233204+forevermatt@users.noreply.github.com>
@forevermatt
forevermatt marked this pull request as ready for review August 19, 2026 19:49
@forevermatt
forevermatt requested a review from a team as a code owner August 19, 2026 19:49
@forevermatt
forevermatt requested review from briskt, ethancanne and hobbitronics and removed request for a team August 19, 2026 19:49
Comment thread check_import_versions.mjs Outdated
Comment thread check_import_versions.mjs Outdated
Comment thread sql_query_data.js
This will help us keep the list in package.json current, which helps us
know if there are security advisories about any of the dependencies we
use.
Using just the major version makes it easier to maintain this, since we
won't have to update the import statements merely due to npm updating
exact package versions in package.json.
@forevermatt

Copy link
Copy Markdown
Contributor

@briskt and @hobbitronics - Here are the changes I made since you reviewed this PR. It's basically just fixing the check-imported-versions code to also fail on (non-built-in) dependencies not listed in package.json, plus adding some missing dependencies and pinning more dependencies at major versions (so this won't take a lot of manual maintaining as versions change).

@forevermatt

Copy link
Copy Markdown
Contributor

@briskt and @hobbitronics - I have made enough changes on this PR that it might merit a 2nd look.

@forevermatt
forevermatt merged commit 7b03764 into main Aug 26, 2026
5 checks passed
@forevermatt
forevermatt deleted the copilot/fix-import-version-constraints branch August 26, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants