cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: Option to create Edge Functions with JavaScript syntax

Open laktek opened this issue 1 year ago • 1 comments

What kind of change does this PR introduce?

This PR adds the option to create, serve, and deploy pure JS functions instead of using TypeScript.

Users can set EdgeRuntime.default_language to either JavaScript or TypeScript to set the language template they want to use. This can be overridden with lang flag when using functions new.

functions serve and functions deploy will now treat for both index.js and index.ts as valid entrypoints.

laktek avatar Oct 14 '24 01:10 laktek

Pull Request Test Coverage Report for Build 11319321701

Details

  • 42 of 59 (71.19%) changed or added relevant lines in 5 files are covered.
  • 16 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.09%) to 60.153%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/functions.go 1 2 50.0%
internal/functions/deploy/deploy.go 7 11 63.64%
internal/functions/new/new.go 29 41 70.73%
<!-- Total: 42 59
Files with Coverage Reduction New Missed Lines %
internal/functions/new/new.go 2 78.13%
internal/gen/keys/keys.go 5 12.9%
internal/utils/config.go 9 86.0%
<!-- Total: 16
Totals Coverage Status
Change from base Build 11290838108: -0.09%
Covered Lines: 6538
Relevant Lines: 10869

💛 - Coveralls

coveralls avatar Oct 14 '24 01:10 coveralls

Will revisit this after we have support to update config.toml

laktek avatar Oct 30 '24 04:10 laktek