endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
804 stars 71 forks source link

ci(viable-release): simple check that the packages are releasable #1749

Closed michaelfig closed 1 year ago

michaelfig commented 1 year ago

refs: #1732

Description

The "Bundle refactoring" in #1732 broke the release process:

$ (cd packages/bundle-source && yarn pack)
yarn pack v1.22.19
$ tsc --build jsconfig.build.json
cache.js:90:7 - error TS2322: Type '{ bundleFileName: any; bundleTime: any; bundleSize: any; moduleSource: { relative: any; absolute: any; }; contents: { relativePath: any; mtime: any; size: any; }[]; }' is not assignable to type 'BundleMeta'.
  Object literal may only specify known properties, but 'bundleSize' does not exist in type 'BundleMeta'. Did you mean to write 'bundleTime'?

90       bundleSize,
         ~~~~~~~~~~

cache.js:178:17 - error TS2339: Property 'bundleTime' does not exist on type 'BundleMeta | undefined'.

178         const { bundleTime, bundleSize, contents } = meta;
                    ~~~~~~~~~~

cache.js:178:29 - error TS2339: Property 'bundleSize' does not exist on type 'BundleMeta | undefined'.

178         const { bundleTime, bundleSize, contents } = meta;
                                ~~~~~~~~~~

cache.js:178:41 - error TS2339: Property 'contents' does not exist on type 'BundleMeta | undefined'.

178         const { bundleTime, bundleSize, contents } = meta;
                                            ~~~~~~~~

Found 4 errors.

error Command failed with exit code 1.
$

This PR is a simple integration test for these kinds of failures (intended to grow more features later) and patches up this particular type error error.

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Upgrade Considerations