Skip to content

Commit 4a9d63f

Browse files
authored
Switching to pnpm for dep management (PipedreamHQ#3225)
* Removing npm deps * Updating pnpm github step versions while we're at it * Adding latest videos * Removing redundant pnpm install commands * Caught some stragglers * Removing other straggler * Fixing $attachments
1 parent 291c8a3 commit 4a9d63f

13 files changed

Lines changed: 34 additions & 10219 deletions

File tree

.github/workflows/publish-components.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
- name: Checkout code
1212
uses: actions/checkout@v3.0.2
13-
- uses: pnpm/action-setup@v2.0.1
13+
- uses: pnpm/action-setup@v2.2.2
1414
with:
1515
version: 7.0.0
1616
- name: Get pnpm store directory
@@ -32,8 +32,6 @@ jobs:
3232
node-version: 14
3333
registry-url: https://registry.npmjs.org/
3434
cache: 'pnpm'
35-
- name: Install Dependencies
36-
run: npm ci
3735
- name: Compile TypeScript
3836
run: npm run build
3937
- name: Install pd cli
@@ -128,8 +126,6 @@ jobs:
128126
registry-url: https://registry.npmjs.org/
129127
cache: 'pnpm'
130128
- name: Install Dependencies
131-
run: npm ci
132-
- name: pnpm install
133129
run: pnpm install -r
134130
- name: Install pd cli
135131
env:

.github/workflows/publish-packages.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2.4.0
12-
- uses: pnpm/action-setup@v2.0.1
12+
- uses: pnpm/action-setup@v2.2.2
1313
with:
1414
version: 7.0.0
1515
- uses: actions/setup-node@v3.3.0
1616
with:
1717
node-version: 14
1818
registry-url: https://registry.npmjs.org/
1919
cache: 'pnpm'
20-
- name: npm install
21-
run: npm ci
2220
- name: pnpm install
2321
run: pnpm install -r
2422
- name: Compile TypeScript

.github/workflows/pull-request-checks.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ jobs:
138138
node-version: 14
139139
registry-url: https://registry.npmjs.org/
140140
cache: 'pnpm'
141-
- name: Install Dependencies
142-
run: npm ci
143141
- name: Compile TypeScript
144142
run: npm run build
145143
- name: Lint Code Base
@@ -161,7 +159,7 @@ jobs:
161159

162160
steps:
163161
- uses: actions/checkout@v2.4.0
164-
- uses: pnpm/action-setup@v2.0.1
162+
- uses: pnpm/action-setup@v2.2.2
165163
with:
166164
version: 7.0.0
167165
- name: Get pnpm store directory
@@ -180,8 +178,6 @@ jobs:
180178
node-version: 14
181179
registry-url: https://registry.npmjs.org/
182180
cache: 'pnpm'
183-
- name: npm install
184-
run: npm ci
185181
- name: pnpm install
186182
run: pnpm install -r
187183
# See https://pnpm.io/using-changesets
@@ -218,8 +214,6 @@ jobs:
218214
registry-url: https://registry.npmjs.org/
219215
cache: 'pnpm'
220216
- name: Install Dependencies
221-
run: npm ci
222-
- name: pnpm install
223217
run: pnpm install -r
224218
- name: Compile TypeScript
225219
id: compile
@@ -260,6 +254,6 @@ jobs:
260254
done
261255
unset IFS
262256
263-
257+
264258

265259

.husky/post-merge

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm ci
54
npx pnpm install -r

docs/docs/cli/install/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Installing the CLI
22

3+
<VideoPlayer src="https://www.youtube.com/embed/CelgPjcB2nU" title="Installing the CLI"/>
4+
35
[[toc]]
46

57
## macOS
@@ -42,8 +44,8 @@ Download the appropriate [Linux CLI build](#cli-builds) for your architecture. U
4244

4345
Pipedream publishes the following builds of the CLI. If you need to use the CLI on another OS or architecture, [please reach out](https://docs.pipedream.com/support/).
4446

45-
| Operating System | Architecture | link |
46-
| ---------------- | ------------ | ---------------------------------------------------------------- |
47+
| Operating System | Architecture | link |
48+
| ---------------- | ------------ | ----------------------------------------------------------------- |
4749
| Linux | amd64 | [download](https://cli.pipedream.com/linux/amd64/latest/pd.zip) |
4850
| Linux | 386 | [download](https://cli.pipedream.com/linux/386/latest/pd.zip) |
4951
| Linux | arm | [download](https://cli.pipedream.com/linux/arm/latest/pd.zip) |

docs/docs/code/nodejs/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ export default defineComponent({
3737
Code steps use the same editor ([Monaco](https://microsoft.github.io/monaco-editor/)) used in Microsoft's [VS Code](https://code.visualstudio.com/), which supports syntax highlighting, automatic indentation, and more.
3838

3939

40-
41-
4240
## Sharing data between steps
4341

4442
A Node.js step can use data from other steps using [step exports](/workflows/steps/#step-exports), it can also export data for other steps to use.
@@ -92,6 +90,8 @@ export default defineComponent({
9290

9391
### Using $.export
9492

93+
<VideoPlayer src="https://youtu.be/9xW5UX0Zxok?t=72" title="Exporting data from a Node.js code step" />
94+
9595
Alternatively, use the built in `$.export` helper instead of returning data. The `$.export` creates a _named_ export with the given value.
9696

9797
```javascript
@@ -123,6 +123,8 @@ Regardless of using `return` or `$.export`, can only export JSON-serializable da
123123

124124
## Passing props to code steps
125125

126+
<VideoPlayer src="https://www.youtube.com/embed/CxOdfgjThjg" title="Passing props to code steps" />
127+
126128
You can make code steps reusable by allowing them to accept props. Instead of hard-coding the values of variables within the code itself, you can pass them to the code step as arguments or parameters _entered in the workflow builder_.
127129

128130
For example, let's define a `firstName` prop. This will allow us to freely enter text from the workflow builder.
@@ -154,6 +156,8 @@ Accepting a single string is just one example, you can build a step to accept ar
154156

155157
## How Pipedream Node.js components work
156158

159+
<VideoPlayer src="https://www.youtube.com/embed/8nnL9sIRGvk" title="Structure of a Node.js Code Step"/>
160+
157161
When you add a new Node.js code step or use the examples in this doc, you'll notice a common structure to the code:
158162

159163
```javascript
@@ -220,6 +224,8 @@ While you can save a workflow with syntax errors, it's unlikely to run correctly
220224

221225
## Using `npm` packages
222226

227+
<VideoPlayer src="https://www.youtube.com/embed/lvTWnSAwEa8" title="Use NPM packages in code steps" />
228+
223229
[npm](https://www.npmjs.com/) hosts JavaScript packages: bits of code someone else has written and packaged for others to use. npm has over 400,000 packages and counting. You can use most of those on Pipedream.
224230

225231
### Just `import` it

docs/docs/code/nodejs/async/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ thumbnail: https://res.cloudinary.com/pipedreamin/image/upload/v1646841376/docs/
55

66
# Running asynchronous code in Node.js
77

8+
<VideoPlayer src="https://www.youtube.com/embed/6mmJyAW7kJI" title="Running asynchronous code in Node.js code steps" />
9+
810
If you're not familiar with asynchronous programming concepts like [callback functions](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function) or [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises), see [this overview](https://eloquentjavascript.net/11_async.html).
911

1012
[[toc]]

docs/docs/code/nodejs/auth/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ thumbnail: https://res.cloudinary.com/pipedreamin/image/upload/v1646763806/docs/
55

66
# Connecting apps in Node.js
77

8+
<VideoPlayer src="https://www.youtube.com/embed/rckGb8BbPuk" title="Connecting apps to Node.js Code Steps" />
9+
810
When you use [prebuilt actions](/components#actions) tied to apps, you don't need to write the code to authorize API requests. Just [connect your account](/connected-accounts/#connecting-accounts) for that app and run your workflow.
911

1012
But sometimes you'll need to [write your own code](/code/nodejs/). You can also connect apps to custom code steps, using the auth information to authorize requests to that app.

docs/docs/code/nodejs/rerun/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export default defineComponent({
7575

7676
## `$.flow.rerun`
7777

78+
<VideoPlayer src="https://www.youtube.com/embed/Fz_hjbza6Yo" title="Rerunning a Node.js code step with $.rerun"/>
79+
7880
Use `$.flow.rerun` when you want to run a specific step of a workflow multiple times. This is useful when you need to start a job in an external API and poll for its completion, or have the service call back to the step and let you process the HTTP request within the step.
7981

8082
### Polling for the status of an external job

docs/docs/components/guidelines/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ team to let us know that you're blocked on source or action development.
101101

102102
When submitting pull requests, the new code will run through a series of
103103
automated checks like linting the code. If you want to run those checks locally
104-
for quicker feedback you must have [NPM](https://www.npmjs.com/) installed and
104+
for quicker feedback you must have [pnpm](https://pnpm.io/) installed and
105105
run the following commands at the root of the project:
106106

107107
1. To install all the project's dependencies (only needed once):
108108

109109
```shell
110-
npm ci
110+
pnpm install
111111
```
112112

113113
2. To run the linter checks against your code (assuming that your changes are
@@ -155,23 +155,23 @@ actions for Pipedream's registry.
155155

156156
### Reference Sources
157157

158-
| Name | App | Type |
159-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | -------------------------------------------- |
158+
| Name | App | Type |
159+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------- |
160160
| [New Card](https://github.com/pipedreamhq/pipedream/blob/master/components/trello/sources/new-card/new-card.mjs) | Trello | Webhook |
161161
| [Search Mentions](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/sources/search-mentions/search-mentions.mjs) | Twitter | Polling |
162162
| [New or Modified Files](https://github.com/pipedreamhq/pipedream/blob/master/components/google_drive/sources/new-or-modified-files/new-or-modified-files.mjs) | Google Drive | Webhook + Polling |
163163
| [New Submission](https://github.com/pipedreamhq/pipedream/blob/master/components/jotform/sources/new-submission/new-submission.mjs) | Jotform | Webhook (with no unique hook ID) |
164-
| [New Stars](https://github.com/pipedreamhq/pipedream/blob/master/components/github/sources/new-star/new-star.js) | Github | Webhook (with extensive use of common files) |
164+
| [New Stars](https://github.com/pipedreamhq/pipedream/blob/master/components/github/sources/new-star/new-star.js) | Github | Webhook (with extensive use of common files) |
165165

166166
### Reference Actions
167167

168168
| Name | App |
169169
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
170170
| [Create Single Record](https://github.com/PipedreamHQ/pipedream/blob/master/components/airtable/actions/create-single-record/create-single-record.js) | Airtable |
171171
| [Add Multiple Rows](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs) | Google Sheets |
172-
| [Send Message](https://github.com/PipedreamHQ/pipedream/blob/master/components/discord_webhook/actions/send-message/send-message.mjs) | Discord |
173-
| [Append Text](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_docs/actions/append-text/append-text.mjs) | Google Docs |
174-
| [`GET` request](https://github.com/PipedreamHQ/pipedream/blob/master/components/http/actions/get-request/get-request.mjs) | HTTP |
172+
| [Send Message](https://github.com/PipedreamHQ/pipedream/blob/master/components/discord_webhook/actions/send-message/send-message.mjs) | Discord |
173+
| [Append Text](https://github.com/PipedreamHQ/pipedream/blob/master/components/google_docs/actions/append-text/append-text.mjs) | Google Docs |
174+
| [`GET` request](https://github.com/PipedreamHQ/pipedream/blob/master/components/http/actions/get-request/get-request.mjs) | HTTP |
175175

176176
## Guidelines & Patterns
177177

0 commit comments

Comments
 (0)