Skip to content

v4.0

@ncalteen ncalteen tagged this 07 Jul 19:44
This pull request introduces support for `pre` and `post` scripts in
GitHub Actions, updates documentation to reflect these changes, and adds
fixtures to test the functionality across different languages and module
systems.

Closes #183 

### Documentation Updates:
*
[`CHANGELOG.md`](diffhunk://#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR3-R13):
Added an entry for version 4, highlighting support for `pre` and `post`
scripts in GitHub Actions.
*
[`README.md`](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L185-R213):
Updated the `local-action run` command to include optional `--pre` and
`--post` arguments, along with examples and descriptions for their
usage.

### Fixture Additions for `pre` and `post` Scripts:
* JavaScript Fixtures:
- Added `pre` and `post` scripts with `index.js` and `main.js` files in
`__fixtures__/javascript/success` and
`__fixtures__/javascript-esm/success`. These scripts demonstrate basic
input handling and output setting for actions.
[[1]](diffhunk://#diff-f8541f0b923ac556ae7560287567c67d2bac46beb480a11ee286b5fe5603d73dR1-R3)
[[2]](diffhunk://#diff-13b3808981fc67a311be46f6573b193dcfda3dac1699c1e934287249cdcd7b63R1-R13)
* TypeScript Fixtures:
- Added `pre` and `post` scripts with `index.ts` and `main.ts` files in
`__fixtures__/typescript/success` and
`__fixtures__/typescript-esm/success`. These scripts showcase similar
functionality as the JavaScript fixtures but with TypeScript syntax.
[[1]](diffhunk://#diff-92977f7e53208fa72e2158e41d5402f216d40720463ecd30f2a2f00781c66f65R1-R3)
[[2]](diffhunk://#diff-d61a1b02638db9fb7d01bdf456f72897331cdfc738572de62445b52b13b370dbR1-R9)
[[3]](diffhunk://#diff-26abda3a139ba9b44e9ef716318f64217b26df0165d0ed9fb1cc2b6acc4b1cecR1-R3)
[[4]](diffhunk://#diff-aeff2990bef1136e31d03757577627865298369c2286e6c2a7c4fa58f929b0c1R1-R9)

### Utility Mock:
*
[`__fixtures__/path.ts`](diffhunk://#diff-92b0347f0720c1eaba4d2f5d1e79e0e96de62442f21dc09e1d7faf51aed10042R1-R7):
Added a mock implementation of the `resolve` function using Jest for
testing purposes.
Assets 2
Loading