Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connect-react): prep preview of @pipedream/connect-react #14718

Merged
merged 38 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8c83595
initial commit
tjk Nov 22, 2024
0f1f0c9
Bump nodejs to 18.18.0
adolfo-pd Nov 22, 2024
b375bf3
lint 1
tjk Nov 22, 2024
a1b0de7
more linting
tjk Nov 22, 2024
b57ecf8
some fixes
tjk Nov 22, 2024
9d8df56
more linting
tjk Nov 22, 2024
f084a9e
TypeScript, ESLint upgrades, moving to new ESLint format
dylburger Nov 22, 2024
4a16b3d
Adding ignores
dylburger Nov 22, 2024
2707030
Updated lock file
dylburger Nov 22, 2024
611a1cc
Revvin pnpm in package.json (for GH actions)
dylburger Nov 22, 2024
b22164a
some changes
tjk Nov 22, 2024
70bfbe0
save
tjk Nov 22, 2024
80ec405
meh fixes to no-explicit-any
tjk Nov 22, 2024
c64f35d
linted, not great, but linted
tjk Nov 22, 2024
1dc232d
Addressing ESLint errors
dylburger Nov 22, 2024
f1c86b7
Merge branch 'master' into connect-react-preview
tjk Nov 22, 2024
264c7da
Merge branch 'connect-react-preview' of github.com:PipedreamHQ/pipedr…
dylburger Nov 22, 2024
7d639cd
Merge branch 'connect-react-preview' of github.com:PipedreamHQ/pipedr…
dylburger Nov 22, 2024
1073c75
revving GH actions
dylburger Nov 22, 2024
4fa8442
npm -> pnpm for SDK tests
dylburger Nov 22, 2024
d08f1f8
Fixing bad rename of props to formContextProps
adolfo-pd Nov 22, 2024
64a52f6
pnpm
dylburger Nov 22, 2024
8d789a5
Merge branch 'connect-react-preview' of github.com:PipedreamHQ/pipedr…
dylburger Nov 22, 2024
f4095a0
Updating lock file
dylburger Nov 22, 2024
c89c1e5
Lock file
dylburger Nov 22, 2024
e810e89
undef
tjk Nov 22, 2024
31c10e0
.eslintrc -> eslint.config.mjs
dylburger Nov 22, 2024
fc17d90
Merge branch 'connect-react-preview' of github.com:PipedreamHQ/pipedr…
dylburger Nov 22, 2024
fc06323
Upgrading super-linter
dylburger Nov 22, 2024
95236e2
sdk remove --ext option
tjk Nov 22, 2024
cb450e4
Removing --ext from eslint
dylburger Nov 22, 2024
3a6d2fe
Merge branch 'connect-react-preview' of github.com:PipedreamHQ/pipedr…
dylburger Nov 22, 2024
1969b72
Disabling JSON linting for now
dylburger Nov 22, 2024
d893d4c
Removing TS build, --ext extension
dylburger Nov 23, 2024
7373b0d
Disabling super-linter for now
dylburger Nov 23, 2024
06c7dc8
pnpm exec eslint
dylburger Nov 23, 2024
a7c7c61
Some updates
dylburger Nov 23, 2024
9781b02
More changes
dylburger Nov 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

233 changes: 0 additions & 233 deletions .eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/components-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/pipedream-sdk-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,30 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: pnpm/[email protected]
with:
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
Comment on lines +21 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update deprecated workflow command and optimize cache configuration

  1. The set-output command is deprecated. Use the new GITHUB_OUTPUT syntax instead.
  2. The cache key could be more specific by including the Node.js version.

Apply this diff:

      - name: Get pnpm store directory
        id: pnpm-cache
        run: |
-         echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
+         echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
      - uses: actions/cache@v4
        name: Setup pnpm cache
        with:
          path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
-         key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+         key: ${{ runner.os }}-pnpm-store-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
-           ${{ runner.os }}-pnpm-store-
+           ${{ runner.os }}-pnpm-store-${{ matrix.node-version }}-
+           ${{ runner.os }}-pnpm-store-

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 actionlint (1.7.3)

26-26: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions

(deprecated-commands)


- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install
run: pnpm install
working-directory: packages/sdk

- name: Run tests
run: npm test
run: pnpm test
Comment on lines +42 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add proper pnpm setup steps before using pnpm commands

While switching to pnpm is good for consistency, the workflow needs additional setup steps to ensure reliable execution.

Add these steps before the "Install dependencies" step:

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'

+     - name: Install pnpm
+       uses: pnpm/action-setup@v2
+       with:
+         version: 9.14.2
+
+     - name: Setup pnpm cache
+       uses: actions/cache@v3
+       with:
+         path: ~/.pnpm-store
+         key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
+         restore-keys: |
+           ${{ runner.os }}-pnpm-

      - name: Install dependencies
        run: pnpm install
        working-directory: packages/sdk

This ensures:

  1. Consistent pnpm version (9.14.2) across workflows
  2. Proper caching for faster installations
  3. Reliable workflow execution
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: pnpm install
working-directory: packages/sdk
- name: Run tests
run: npm test
run: pnpm test
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9.14.2
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install
working-directory: packages/sdk
- name: Run tests
run: pnpm test

working-directory: packages/sdk
4 changes: 2 additions & 2 deletions .github/workflows/publish-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Verify Node.js compatibility with pnpm 9.14.2

The workflow uses Node.js 14 with pnpm 9.14.2. According to pnpm's documentation, version 9.x requires Node.js 16 or higher. Consider upgrading the Node.js version to ensure compatibility.

Apply this change to both jobs:

       uses: actions/[email protected]
       with:
-         node-version: 14
+         node-version: 16

Also applies to: 125-125

- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-marketplace-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Verify Node.js compatibility with pnpm 9.14.2

The workflow uses Node.js 14 which might be too old for pnpm 9.x. According to pnpm's documentation, version 9.x requires Node.js 16 or higher.

Consider updating the Node.js version in the workflow:

       uses: actions/[email protected]
       with:
-         node-version: 14
+         node-version: 16

Committable suggestion skipped: line range outside the PR's diff.

- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- name: Get pnpm store directory
if: github.ref != 'refs/heads/master' # Cache is used only for dry runs
id: pnpm-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-platform-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- uses: actions/[email protected]
with:
node-version: 18
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: 7.33.6
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand All @@ -70,31 +70,29 @@ jobs:
- name: Install dependencies
run: pnpm install -r
- name: Setup Node Env
uses: actions/setup-node@v4.0.3
uses: actions/setup-node@v4.1.0
with:
node-version: 18
node-version: 18.18.0
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Compile TypeScript
run: npm run build
- name: Lint Code Base
uses: github/super-linter@v6
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc
LINTER_RULES_PATH: /
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_JSON: true
# - name: Lint Code Base
# uses: super-linter/super-linter/[email protected]
# env:
# DEFAULT_BRANCH: master
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# JAVASCRIPT_ES_CONFIG_FILE: eslint.config.mjs
# LINTER_RULES_PATH: /
# VALIDATE_ALL_CODEBASE: false
# VALIDATE_JAVASCRIPT_ES: true
# VALIDATE_JSON: true
# ESLint only on changed files (not the same as the above super-linter)
- name: Get Changed Files (space-separated)
id: changed_files_space
uses: Ana06/[email protected]
with:
format: 'space-delimited'
- name: Lint changed files
run: npx eslint --quiet ${{ steps.changed_files_space.outputs.added_modified }} ${{ steps.changed_files_space.outputs.renamed }}
run: pnpm exec eslint ${{ steps.changed_files_space.outputs.added_modified }} ${{ steps.changed_files_space.outputs.renamed }}
- name: Get Changed Files (comma-separated)
id: changed_files
uses: Ana06/[email protected]
Expand Down
Loading
Loading