We'd love to accept your patches and contributions to this project. There are a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Developer Certificate of Origin (DCO). You (or your employer) retain the copyright to your contribution; this gives us permission to use and redistribute your contributions as part of the project. Head over to https://developercertificate.org/ to see your current agreements on file or to sign a new one.
You only need to submit a DTO once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
All pull requests should have an associated test to ensure foward compatibility.
Make sure you have installed Dapr before running unit tests, check out Install Dapr CLI for more details
To run an individual test, you can run a command such as the following:
npm run test -- -g 'loading function'When developing a feature locally, you can install a local version of the Functions Framework using npm link. First compile your local clone of the Functions Framework:
You'll need to install typescript first by:
npm install typescript --save-dev
npx tscThen link the Functions Framework using npm link.
npm linkYou can then run the Functions Framework locally using functions-framework.
This module is published using Release Please. When you merge a release PR, the npm package will be automatically published.
# Login to npm registry, contact repo admin for https://www.npmjs.com/ user name and password
npm login
# First run a dry run to find out errors
npm publish ./ --access public --dry-run
# Then publish the package
npm publish --access publicIf the release process fails, you can revert the publish by running the following (i.e. unpublishing 1.10.0):
# Unpublish the package (must be done within 72 hours of publishing).
# If >72 hours, deprecate a specific release and publish a newer version.
# i.e. `npm deprecate @openfunction/functions-framework@0.3.6 "archive old version"`
# See https://docs.npmjs.com/policies/unpublish#what-to-do-if-your-package-does-not-meet-the-unpublish-criteria
npm unpublish @openfunction/functions-framework@0.3.6
# Set the default version to the previous working version.
npm dist-tag add @openfunction/functions-framework@0.3.3 latestTo generate the API Extractor documentation, run the API extractor with the following command:
You'll need to install
api-extractorfirst bynpm install -g @microsoft/api-extractorand then installgtsbynpm install gts
npm run docsThe docs will be generated in docs/generated/.
This project follows CNCF openness guidelines.