Skip to content

Commit

Permalink
Upgrade to node v16
Browse files Browse the repository at this point in the history
  • Loading branch information
robwa10 committed Jan 16, 2023
1 parent 5182f49 commit f9ad3b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ <h3 id="requirements">Requirements</h3>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<p>All Zapier CLI apps are run using Node.js <code>v14</code>.</p><p>You can develop using any version of Node you&apos;d like, but your eventual code must be compatible with <code>v14</code>. If you&apos;re using features not yet available in <code>v14</code>, you can transpile your code to a compatible format with <a href="https://babeljs.io/">Babel</a> (or similar).</p><p>To ensure stability for our users, we strongly encourage you run tests on <code>v14</code> sometime before your code reaches users. This can be done multiple ways.</p><p>Firstly, by using a CI tool (like <a href="https://travis-ci.org/">Travis CI</a> or <a href="https://circleci.com/">Circle CI</a>, which are free for open source projects). We provide a sample <a href="https://github.com/zapier/zapier-platform/blob/master/example-apps/trigger/.travis.yml">.travis.yml</a> file in our template apps to get you started.</p><p>Alternatively, you can change your local node version with tools such as <a href="https://github.com/nvm-sh/nvm#installation-and-update">nvm</a>. Then you can either swap to that version with <code>nvm use v14</code>, or do <code>nvm exec v14 zapier test</code> so you can run tests without having to switch versions while developing.</p>
<p>All Zapier CLI apps are run using Node.js <code>v16</code>.</p><p>You can develop using any version of Node you&apos;d like, but your eventual code must be compatible with <code>v16</code>. If you&apos;re using features not yet available in <code>v16</code>, you can transpile your code to a compatible format with <a href="https://babeljs.io/">Babel</a> (or similar).</p><p>To ensure stability for our users, we strongly encourage you run tests on <code>v16</code> sometime before your code reaches users. This can be done multiple ways.</p><p>Firstly, by using a CI tool (like <a href="https://travis-ci.org/">Travis CI</a> or <a href="https://circleci.com/">Circle CI</a>, which are free for open source projects). We provide a sample <a href="https://github.com/zapier/zapier-platform/blob/master/example-apps/trigger/.travis.yml">.travis.yml</a> file in our template apps to get you started.</p><p>Alternatively, you can change your local node version with tools such as <a href="https://github.com/nvm-sh/nvm#installation-and-update">nvm</a>. Then you can either swap to that version with <code>nvm use v16</code>, or do <code>nvm exec v16 zapier test</code> so you can run tests without having to switch versions while developing.</p>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

Expand Down Expand Up @@ -4756,7 +4756,7 @@ <h3 id="testing-in-your-ci">Testing in Your CI</h3>
<div class="col-md-7 col-sm-12 col-height docs-code">
<pre><code class="lang-yaml"><span class="hljs-attr">language:</span> <span class="hljs-string">node_js</span>
<span class="hljs-attr">node_js:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">&quot;v14&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">&quot;v16&quot;</span>
<span class="hljs-attr">before_script:</span> <span class="hljs-string">npm</span> <span class="hljs-string">install</span> <span class="hljs-string">-g</span> <span class="hljs-string">zapier-platform-cli</span>
<span class="hljs-attr">script:</span> <span class="hljs-string">CLIENT_ID=1234</span> <span class="hljs-string">CLIENT_SECRET=abcd</span> <span class="hljs-string">zapier</span> <span class="hljs-string">test</span>
</code></pre>
Expand Down Expand Up @@ -5049,7 +5049,7 @@ <h3 id="why-doesnt-zapier-support-newer-versions-of-nodejs">Why doesn&apos;t Zap
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<p>We run your code on AWS Lambda, which only supports a few <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html">versions</a> of Node (the latest of which is <code>v14</code>. As that updates, so too will we.</p>
<p>We run your code on AWS Lambda, which only supports a few <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html">versions</a> of Node (the latest of which is <code>v16</code>. As that updates, so too will we.</p>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

Expand Down Expand Up @@ -5430,7 +5430,7 @@ <h3 id="node-x-no-longer-supported">Node X No Longer Supported</h3>
<p>... then you need to update your <code>zapier-platform-core</code> dependency to a non-deprecated version that uses a newer version of Node.js. Complete the following instructions as soon as possible:</p><ol>
<li>Edit <code>package.json</code> to depend on a later major version of <code>zapier-platform-core</code>. There&apos;s a list of all breaking changes (marked with a :exclamation:) in the <a href="https://github.com/zapier/zapier-platform/blob/master/CHANGELOG.md">changelog</a>.</li>
<li>Increment the <code>version</code> property in <code>package.json</code></li>
<li>Ensure you&apos;re using version <code>v14</code> (or greater) of node locally (<code>node -v</code>). Use <a href="https://github.com/nvm-sh/nvm">nvm</a> to use a different one if need be.</li>
<li>Ensure you&apos;re using version <code>v16</code> (or greater) of node locally (<code>node -v</code>). Use <a href="https://github.com/nvm-sh/nvm">nvm</a> to use a different one if need be.</li>
<li>Run <code>rm -rf node_modules &amp;&amp; npm i</code> to get a fresh copy of everything</li>
<li>Run <code>zapier test</code> to ensure your tests still pass</li>
<li>Run <code>zapier push</code></li>
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ Zapier Platform CLI is designed to be used by development teams who collaborate
### Requirements

All Zapier CLI apps are run using Node.js `v14`.
All Zapier CLI apps are run using Node.js `v16`.

You can develop using any version of Node you'd like, but your eventual code must be compatible with `v14`. If you're using features not yet available in `v14`, you can transpile your code to a compatible format with [Babel](https://babeljs.io/) (or similar).
You can develop using any version of Node you'd like, but your eventual code must be compatible with `v16`. If you're using features not yet available in `v16`, you can transpile your code to a compatible format with [Babel](https://babeljs.io/) (or similar).

To ensure stability for our users, we strongly encourage you run tests on `v14` sometime before your code reaches users. This can be done multiple ways.
To ensure stability for our users, we strongly encourage you run tests on `v16` sometime before your code reaches users. This can be done multiple ways.

Firstly, by using a CI tool (like [Travis CI](https://travis-ci.org/) or [Circle CI](https://circleci.com/), which are free for open source projects). We provide a sample [.travis.yml](https://github.com/zapier/zapier-platform/blob/master/example-apps/trigger/.travis.yml) file in our template apps to get you started.

Alternatively, you can change your local node version with tools such as [nvm](https://github.com/nvm-sh/nvm#installation-and-update). Then you can either swap to that version with `nvm use v14`, or do `nvm exec v14 zapier test` so you can run tests without having to switch versions while developing.
Alternatively, you can change your local node version with tools such as [nvm](https://github.com/nvm-sh/nvm#installation-and-update). Then you can either swap to that version with `nvm use v16`, or do `nvm exec v16 zapier test` so you can run tests without having to switch versions while developing.


### Quick Setup Guide
Expand Down Expand Up @@ -2918,7 +2918,7 @@ This makes it straightforward to integrate into your testing interface. For exam
```yaml
language: node_js
node_js:
- "v14"
- "v16"
before_script: npm install -g zapier-platform-cli
script: CLIENT_ID=1234 CLIENT_SECRET=abcd zapier test
```
Expand Down Expand Up @@ -3107,7 +3107,7 @@ There are a lot of details left out - check out the full example app for a worki

### Why doesn't Zapier support newer versions of Node.js?

We run your code on AWS Lambda, which only supports a few [versions](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) of Node (the latest of which is `v14`. As that updates, so too will we.
We run your code on AWS Lambda, which only supports a few [versions](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) of Node (the latest of which is `v16`. As that updates, so too will we.

### How do I manually set the Node.js version to run my app with?

Expand Down Expand Up @@ -3390,7 +3390,7 @@ InvalidParameterValueException An error occurred (InvalidParameterValueException

1. Edit `package.json` to depend on a later major version of `zapier-platform-core`. There's a list of all breaking changes (marked with a :exclamation:) in the [changelog](https://github.com/zapier/zapier-platform/blob/master/CHANGELOG.md).
2. Increment the `version` property in `package.json`
3. Ensure you're using version `v14` (or greater) of node locally (`node -v`). Use [nvm](https://github.com/nvm-sh/nvm) to use a different one if need be.
3. Ensure you're using version `v16` (or greater) of node locally (`node -v`). Use [nvm](https://github.com/nvm-sh/nvm) to use a different one if need be.
4. Run `rm -rf node_modules && npm i` to get a fresh copy of everything
5. Run `zapier test` to ensure your tests still pass
6. Run `zapier push`
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ <h3 id="requirements">Requirements</h3>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<p>All Zapier CLI apps are run using Node.js <code>v14</code>.</p><p>You can develop using any version of Node you&apos;d like, but your eventual code must be compatible with <code>v14</code>. If you&apos;re using features not yet available in <code>v14</code>, you can transpile your code to a compatible format with <a href="https://babeljs.io/">Babel</a> (or similar).</p><p>To ensure stability for our users, we strongly encourage you run tests on <code>v14</code> sometime before your code reaches users. This can be done multiple ways.</p><p>Firstly, by using a CI tool (like <a href="https://travis-ci.org/">Travis CI</a> or <a href="https://circleci.com/">Circle CI</a>, which are free for open source projects). We provide a sample <a href="https://github.com/zapier/zapier-platform/blob/master/example-apps/trigger/.travis.yml">.travis.yml</a> file in our template apps to get you started.</p><p>Alternatively, you can change your local node version with tools such as <a href="https://github.com/nvm-sh/nvm#installation-and-update">nvm</a>. Then you can either swap to that version with <code>nvm use v14</code>, or do <code>nvm exec v14 zapier test</code> so you can run tests without having to switch versions while developing.</p>
<p>All Zapier CLI apps are run using Node.js <code>v16</code>.</p><p>You can develop using any version of Node you&apos;d like, but your eventual code must be compatible with <code>v16</code>. If you&apos;re using features not yet available in <code>v16</code>, you can transpile your code to a compatible format with <a href="https://babeljs.io/">Babel</a> (or similar).</p><p>To ensure stability for our users, we strongly encourage you run tests on <code>v16</code> sometime before your code reaches users. This can be done multiple ways.</p><p>Firstly, by using a CI tool (like <a href="https://travis-ci.org/">Travis CI</a> or <a href="https://circleci.com/">Circle CI</a>, which are free for open source projects). We provide a sample <a href="https://github.com/zapier/zapier-platform/blob/master/example-apps/trigger/.travis.yml">.travis.yml</a> file in our template apps to get you started.</p><p>Alternatively, you can change your local node version with tools such as <a href="https://github.com/nvm-sh/nvm#installation-and-update">nvm</a>. Then you can either swap to that version with <code>nvm use v16</code>, or do <code>nvm exec v16 zapier test</code> so you can run tests without having to switch versions while developing.</p>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

Expand Down Expand Up @@ -4756,7 +4756,7 @@ <h3 id="testing-in-your-ci">Testing in Your CI</h3>
<div class="col-md-7 col-sm-12 col-height docs-code">
<pre><code class="lang-yaml"><span class="hljs-attr">language:</span> <span class="hljs-string">node_js</span>
<span class="hljs-attr">node_js:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">&quot;v14&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">&quot;v16&quot;</span>
<span class="hljs-attr">before_script:</span> <span class="hljs-string">npm</span> <span class="hljs-string">install</span> <span class="hljs-string">-g</span> <span class="hljs-string">zapier-platform-cli</span>
<span class="hljs-attr">script:</span> <span class="hljs-string">CLIENT_ID=1234</span> <span class="hljs-string">CLIENT_SECRET=abcd</span> <span class="hljs-string">zapier</span> <span class="hljs-string">test</span>
</code></pre>
Expand Down Expand Up @@ -5049,7 +5049,7 @@ <h3 id="why-doesnt-zapier-support-newer-versions-of-nodejs">Why doesn&apos;t Zap
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<p>We run your code on AWS Lambda, which only supports a few <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html">versions</a> of Node (the latest of which is <code>v14</code>. As that updates, so too will we.</p>
<p>We run your code on AWS Lambda, which only supports a few <a href="https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html">versions</a> of Node (the latest of which is <code>v16</code>. As that updates, so too will we.</p>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

Expand Down Expand Up @@ -5430,7 +5430,7 @@ <h3 id="node-x-no-longer-supported">Node X No Longer Supported</h3>
<p>... then you need to update your <code>zapier-platform-core</code> dependency to a non-deprecated version that uses a newer version of Node.js. Complete the following instructions as soon as possible:</p><ol>
<li>Edit <code>package.json</code> to depend on a later major version of <code>zapier-platform-core</code>. There&apos;s a list of all breaking changes (marked with a :exclamation:) in the <a href="https://github.com/zapier/zapier-platform/blob/master/CHANGELOG.md">changelog</a>.</li>
<li>Increment the <code>version</code> property in <code>package.json</code></li>
<li>Ensure you&apos;re using version <code>v14</code> (or greater) of node locally (<code>node -v</code>). Use <a href="https://github.com/nvm-sh/nvm">nvm</a> to use a different one if need be.</li>
<li>Ensure you&apos;re using version <code>v16</code> (or greater) of node locally (<code>node -v</code>). Use <a href="https://github.com/nvm-sh/nvm">nvm</a> to use a different one if need be.</li>
<li>Run <code>rm -rf node_modules &amp;&amp; npm i</code> to get a fresh copy of everything</li>
<li>Run <code>zapier test</code> to ensure your tests still pass</li>
<li>Run <code>zapier push</code></li>
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const BLACKLISTED_PATHS = [
];
const NODE_VERSION = versionStore[versionStore.length - 1].nodeVersion;
const LAMBDA_VERSION = `v${NODE_VERSION}`;
const NODE_VERSION_CLI_REQUIRES = '>=12'; // should be the oldest non-ETL version
const NODE_VERSION_CLI_REQUIRES = '>=14'; // should be the oldest non-ETL version
const AUTH_KEY = 'deployKey';
const ANALYTICS_KEY = 'analyticsMode';
const ANALYTICS_MODES = {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/version-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module.exports = [
{ nodeVersion: '12', npmVersion: '>=5.6.0' }, // 10.x
{ nodeVersion: '14', npmVersion: '>=5.6.0' }, // 11.x
{ nodeVersion: '14', npmVersion: '>=5.6.0' }, // 12.x
// { nodeVersion: '16', npmVersion: '>=5.6.0' }, // 13.x
{ nodeVersion: '16', npmVersion: '>=5.6.0' }, // 13.x
];

0 comments on commit f9ad3b3

Please sign in to comment.