From 31b8290ee98c1ed4f603c9e8ba4a54c87b0066bb Mon Sep 17 00:00:00 2001 From: David Weitzman Date: Thu, 30 Nov 2023 10:05:54 -0800 Subject: [PATCH 1/4] Create a .nvmrc file so "nvm use" will pick an appropriate node version --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..3f430af82b --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18 From d82c44aa7df0b5d8eb70633beadb6a3ebd2104be Mon Sep 17 00:00:00 2001 From: David Weitzman Date: Thu, 30 Nov 2023 10:53:17 -0800 Subject: [PATCH 2/4] Mention nvm in the contributing docs --- CONTRIBUTING.md | 6 ++++++ setup-env.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bee5561659..c88cda173b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,6 +36,12 @@ You can then install the other dependencies using the Makefile using the bootstr make bootstrap ``` +To develop on your own computer, make sure you have a compatible version of node install in your environment. The simplest way to make sure you're using a supported +version of node is to install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following command each time you open a terminal in the packs-sdk repo: + +```sh +source setup-env.sh +``` ### Preview documentation diff --git a/setup-env.sh b/setup-env.sh index f38814fc79..7734cd7137 100644 --- a/setup-env.sh +++ b/setup-env.sh @@ -9,3 +9,9 @@ if [[ "$(uname -s)" == "Darwin" ]] && [[ "$(arch)" == "arm64" ]]; then fi export PATH=${BASEDIR}/build/node/bin:${BASEDIR}/node_modules/.bin:${BASEDIR}/.pnpm_install/bin:${PATH} + +if command -v nvm &> /dev/null +then + # Gets version from .nvmrc + nvm use +fi From 7113139dff8df960da94a1f0bbf0b84507667e84 Mon Sep 17 00:00:00 2001 From: David Weitzman Date: Thu, 30 Nov 2023 10:54:57 -0800 Subject: [PATCH 3/4] Fix typo --- CONTRIBUTING.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c88cda173b..04e30ec289 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,17 +4,14 @@ Changes to the core SDK itself can only be made by Coda engineers, and they must be coordinated with changes to the core Coda product. We do however welcome contributions to the [SDK documentation][docs], which can be done without access to or knowledge of the private codebase. - ## Documentation changes For small contributions, such fixing a typo or adding a clarifying sentence, you can directly submit a pull request to this repo. For larger changes, such as adding a new page or code sample, first make a post to the [Coda Community][community] with your intentions to get feedback from a Codan. This helps ensure that you don't waste effort for a change which may not be approved. - ### Style guide When contributing to the documentation, please ensure your changes comply with the [style guide][style_guide]. Some elements of the style guide are enforced automatically using lint rules, but many others must be caught manually. - ### Environment setup While some documentation changes require only a single edit, others require building or validating your changes using the scripts in this repo's `Makefile`. This build system is designed to work on Unix-like command lines (Linux, Mac OSX, etc) and has a lot of dependencies. @@ -36,7 +33,7 @@ You can then install the other dependencies using the Makefile using the bootstr make bootstrap ``` -To develop on your own computer, make sure you have a compatible version of node install in your environment. The simplest way to make sure you're using a supported +To develop on your own computer, make sure you have a compatible version of node installed in your environment. The simplest way to make sure you're using a compatible version of node is to install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following command each time you open a terminal in the packs-sdk repo: ```sh @@ -53,7 +50,6 @@ make view-docs This will serve the documentation on localhost:8000. If you are using Google Cloud Shell, use the **Web Preview** icon at the top, changing the port to "8000", to view the documentation. - ### Changes to reference docs The reference documentation (under `docs/reference/sdk`) is automatically generated from the TypeScript definitions. Don't edit these markdown files directly, but instead make the change to the comment in the corresponding TypeScript file. Then to rebuild the markdown files run: @@ -62,7 +58,6 @@ The reference documentation (under `docs/reference/sdk`) is automatically genera make docs ``` - ### Validating your changes Before opening a pull request we recommend that you first do a full build of the SDK. This will ensure that none of your changes break the core functionality of the SDK. @@ -79,19 +74,16 @@ Additionally, you should run the `lint` check to ensure that all of your changes make lint ``` - ## SDK changes The following section includes information about how to contribute to the SDK itself, which is only done by Coda engineers. - ### Publishing Changes Process Adjustments to the `CHANGELOG.md` file should be marked under `### Not yet released` until a release commit is made that updates `package.json` and `CHANGELOG.md` file with a new, later version, and publishes the new version to NPM using `make release`. Our `CHANGELOG.md` follows the [Keep a Changelog][keepachangelog] standards, where there is a “Unreleased” section at the top for any unreleased changes. Upon release, it is named according to a semantic versioning system and dated. - [docs]: https://coda.io/packs/build [community]: https://community.coda.io/c/developers-central/making-packs/15 [cloud_shell]: https://cloud.google.com/shell From debf5c0cb63ca6442a7a23a893f34eee640ae21d Mon Sep 17 00:00:00 2001 From: David Weitzman Date: Thu, 30 Nov 2023 11:01:50 -0800 Subject: [PATCH 4/4] Remove unintended changes --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 04e30ec289..a62de22c60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,14 +4,17 @@ Changes to the core SDK itself can only be made by Coda engineers, and they must be coordinated with changes to the core Coda product. We do however welcome contributions to the [SDK documentation][docs], which can be done without access to or knowledge of the private codebase. + ## Documentation changes For small contributions, such fixing a typo or adding a clarifying sentence, you can directly submit a pull request to this repo. For larger changes, such as adding a new page or code sample, first make a post to the [Coda Community][community] with your intentions to get feedback from a Codan. This helps ensure that you don't waste effort for a change which may not be approved. + ### Style guide When contributing to the documentation, please ensure your changes comply with the [style guide][style_guide]. Some elements of the style guide are enforced automatically using lint rules, but many others must be caught manually. + ### Environment setup While some documentation changes require only a single edit, others require building or validating your changes using the scripts in this repo's `Makefile`. This build system is designed to work on Unix-like command lines (Linux, Mac OSX, etc) and has a lot of dependencies. @@ -50,6 +53,7 @@ make view-docs This will serve the documentation on localhost:8000. If you are using Google Cloud Shell, use the **Web Preview** icon at the top, changing the port to "8000", to view the documentation. + ### Changes to reference docs The reference documentation (under `docs/reference/sdk`) is automatically generated from the TypeScript definitions. Don't edit these markdown files directly, but instead make the change to the comment in the corresponding TypeScript file. Then to rebuild the markdown files run: @@ -58,6 +62,7 @@ The reference documentation (under `docs/reference/sdk`) is automatically genera make docs ``` + ### Validating your changes Before opening a pull request we recommend that you first do a full build of the SDK. This will ensure that none of your changes break the core functionality of the SDK. @@ -74,16 +79,19 @@ Additionally, you should run the `lint` check to ensure that all of your changes make lint ``` + ## SDK changes The following section includes information about how to contribute to the SDK itself, which is only done by Coda engineers. + ### Publishing Changes Process Adjustments to the `CHANGELOG.md` file should be marked under `### Not yet released` until a release commit is made that updates `package.json` and `CHANGELOG.md` file with a new, later version, and publishes the new version to NPM using `make release`. Our `CHANGELOG.md` follows the [Keep a Changelog][keepachangelog] standards, where there is a “Unreleased” section at the top for any unreleased changes. Upon release, it is named according to a semantic versioning system and dated. + [docs]: https://coda.io/packs/build [community]: https://community.coda.io/c/developers-central/making-packs/15 [cloud_shell]: https://cloud.google.com/shell