You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change eliminates two import cycles found in `@actions/core`.
These import cycles would prevent rollupjs from removing unused code
within `@actions/core`, bloating the resultant packaged js. Anecdotally,
with these changes, a project I work on that only uses core's `info` and
`setState` was reduced in size from 1.0MiB to approximately 244KiB.
- `core.ts` <-> `oidc-utils.ts`:
- `core.ts` importing from `oidc-utils.ts` for the purpose of
forming and exporting `getIDToken()`.
- `oidc-utils.ts` was importing `debug()` and `setSecret` from
`core.ts`.
- Resolved by:
- Moving `getIDToken` into `oidc-utils.ts`.
- Moving all package exports into `index.ts`, including the export
of `getIDToken`.
- `core.ts` <-> `utils.ts`:
- `core.ts` importing `toCommandProperties` and `toCommandValue` from
`utils.ts`.
- `utils.ts` importing `AnnotationProperties` from `core.ts`.
- Resolved by moving the definition of `AnnotationProperties` into
`core-type.ts`, and having `utils.ts` import from there.
Partially fixes#1436, where one of the import cycles were first
described.
0 commit comments