Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(v3): Fix watch task to detect changes in ZE API package #3023

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

t1m0thyj
Copy link
Member

What It Does
Fixes regression of #2686 in the vNext branch after we migrated from ts-loader to esbuild-loader

Although esbuild doesn't officially support TS project references, we can trick it into supporting them by adding an exports section to ZE API package.json as suggested in evanw/esbuild#1250 (comment).

Also removes 2 Webpack plugins:

  • copy-webpack-plugin - It tried to overwrite files on every incremental build which could cause file access errors on Windows. Replaced with a copy-secrets npm script that runs only on build.
  • tsconfig-paths-webpack-plugin - It conflicts with the conditionNames configuration added in this PR.

How to Test

  • Launch the debug task to run ZE or the FTP extension which starts a watch task in the terminal
  • Make a change to source code inside the "zowe-explorer-api" package and save the file
  • The watch task should automatically trigger to rebuild with code changes made to ZE API
  • Set a breakpoint in a TS file in the "zowe-explorer-api" package and make sure it triggers

@t1m0thyj t1m0thyj added the no-changelog Add to PR's that don't require a CHANGELOG update label Jul 26, 2024
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

Changes LGTM, was able to debug the API after making a change. Thanks Timothy for resolving this & the Secrets SDK binary issue 😋

Copy link

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.82%. Comparing base (4548918) to head (ae65671).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3023   +/-   ##
=======================================
  Coverage   92.82%   92.82%           
=======================================
  Files         107      107           
  Lines       10887    10887           
  Branches     2369     2366    -3     
=======================================
  Hits        10106    10106           
  Misses        779      779           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@t1m0thyj t1m0thyj merged commit 2950dfa into next Jul 29, 2024
28 checks passed
@t1m0thyj t1m0thyj deleted the dev/fix-ze-api-watch branch July 29, 2024 14:02
@t1m0thyj t1m0thyj mentioned this pull request Aug 2, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Add to PR's that don't require a CHANGELOG update
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants