Skip to content

Conversation

ShadowCat567
Copy link
Contributor

@ShadowCat567 ShadowCat567 commented Sep 8, 2025

Problem

@zip.js/zip.js released a new version where they removed the getData property from the DirectoryEntry type. The DirectoryEntry type is part of the type union that makes up the type Entry. Since we do ensure we are getting FileEntry in this integration test, then the removal of the getData field from the DirectoryEntry type means that typescript isn't sure whether we have a FileEntry or a DirectoryEntry when we get to entry.getData!(new TextWriter()) so it throws an error because getData is only defined for the FileEntry type.

Issue number, if available:

Changes

Since we are expecting the file index.mjs to have type FileEntry, we assert that the directory property is set to false.

Corresponding docs PR, if applicable:

Validation

Successful canary run: https://github.com/aws-amplify/amplify-backend/actions/runs/17562239264

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a change to the Project Architecture README, I have included that update in this PR.
  • If this PR requires a docs update, I have linked to that docs PR above.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

changeset-bot bot commented Sep 8, 2025

🦋 Changeset detected

Latest commit: e89bb27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ShadowCat567 ShadowCat567 changed the title Ensure FileEntry Ensure FileEntry type Sep 8, 2025
@ShadowCat567 ShadowCat567 marked this pull request as ready for review September 8, 2025 21:04
@ShadowCat567 ShadowCat567 requested a review from a team as a code owner September 8, 2025 21:04
@ShadowCat567 ShadowCat567 changed the title Ensure FileEntry type Ensure we are getting FileEntry type Sep 8, 2025
@ShadowCat567 ShadowCat567 enabled auto-merge (squash) September 8, 2025 21:10
@ShadowCat567 ShadowCat567 merged commit b19c80d into main Sep 8, 2025
51 of 52 checks passed
@ShadowCat567 ShadowCat567 deleted the solidify-type branch September 8, 2025 21:16
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