Skip to content

Support for TSConfig Paths#34

Merged
ncalteen merged 32 commits intogithub:mainfrom
ncalteen:main
Feb 15, 2024
Merged

Support for TSConfig Paths#34
ncalteen merged 32 commits intogithub:mainfrom
ncalteen:main

Conversation

@ncalteen
Copy link
Copy Markdown
Collaborator

@ncalteen ncalteen commented Feb 15, 2024

This PR primarily adds support for TypeScript actions that make use of TSConfig paths.

Previously this was not functioning due to TypeScript attempting to resolve modules based on this project's tsconfig.json instead of the one used by the action itself. This is implemented by changing the structure of this project to do the following:

  • The bin map in package.json now maps the local-action command to a basic shell script, bin/local-action
  • The bin/local-action script invokes src/bootstrap.js before the entrypoint of this project is called
  • The src/bootstrap.js script loads tsconfig-paths and registers any paths set in the called action's tsconfig.json.
  • The entrypoint of this project is called once any additional paths have been registered.

Though there shouldn't be any "breaking" changes, the rather large changes in functionality warrant a major version change.


Additionally, a number of code quality/cleanup tasks were completed:

  • Enable step debug logging by default in the example dotenv file (.env.example).
  • Clarify support and contribution guidelines.
  • Switch to tsx from ts-node and remove prerequisite.
  • Fix various linting and typing issues.
  • Bump several dependencies.
  • Shift imports to avoid issues with proxyquire and module loading.
  • Docstring all the things!
  • Remove some unnecessary TSConfig settings.

Closes #33

@ncalteen ncalteen self-assigned this Feb 15, 2024
@ncalteen ncalteen merged commit eb2a352 into github:main Feb 15, 2024
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.

Support for TSConfig Paths

1 participant