Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "notion-query-database",
name: "Query Database",
description: "Query a database with a specified filter. [See the documentation](https://developers.notion.com/reference/post-database-query)",
version: "0.1.1",
version: "0.1.2",
type: "action",
props: {
notion,
Expand Down
2 changes: 1 addition & 1 deletion components/notion/notion.app.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import notion from "@notionhq/client";
import notion from "@notionhq/client@4.0.2";
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Package specifier with version suffix will fail to resolve; rely on package.json and standard ESM import.

Node/ESM resolution won’t resolve "@notionhq/[email protected]". You already pin 4.0.2 in components/notion/package.json, so this double‑pin is unnecessary and risky. Use a namespace or named import from "@notionhq/client" and keep the existing usage.

Apply this minimal fix:

-import notion from "@notionhq/[email protected]";
+import * as notion from "@notionhq/client";

Run to find any other imports pinning versions in specifiers:


🏁 Script executed:

#!/bin/bash
rg -nP -g '!**/node_modules/**' '\bfrom\s+["'\''][^"'\''@]*@[\d]+\.[\d]+\.[\d]+["'\'']'

Length of output: 148


To catch any version-pinned imports across JS/TS/MJS files (excluding node_modules), run:


🏁 Script executed:

#!/bin/bash
# Search ESM imports with version suffix
rg -nP --type js --type ts --type mjs -n -g '!node_modules/**' 'from\s+["'\'']@?[^"\'']+@[0-9]+\.[0-9]+\.[0-9]+' 

# Search CommonJS requires with version suffix
rg -nP --type js --type ts --type mjs -n -g '!node_modules/**' 'require\(["'\'']@?[^"\'']+@[0-9]+\.[0-9]+\.[0-9]+'

Length of output: 55


To reliably detect any version-pinned imports across all JS/TS/MJS files (excluding node_modules), run:


🏁 Script executed:

#!/bin/bash
# ESM imports with version suffix
rg -nP -n -g '!node_modules/**' -g '*.js' -g '*.ts' -g '*.mjs' "from\s+['\"][^'\"]+@[0-9]+\.[0-9]+\.[0-9]+['\"]"

# CommonJS requires with version suffix
rg -nP -n -g '!node_modules/**' -g '*.js' -g '*.ts' -g '*.mjs' "require\(['\"][^'\"]+@[0-9]+\.[0-9]+\.[0-9]+['\"]\)"

Length of output: 79


Fix version-pinned import in components/notion/notion.app.mjs
The @4.0.2 suffix in the import path breaks ESM resolution. Remove it and import from the package name:

-import notion from "@notionhq/[email protected]";
+import * as notion from "@notionhq/client";
📝 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
import notion from "@notionhq/client@4.0.2";
import * as notion from "@notionhq/client";
🤖 Prompt for AI Agents
In components/notion/notion.app.mjs around line 1, the import uses a
version-pinned path ("@notionhq/[email protected]") which breaks ESM resolution;
change the import to the package name only by removing the "@4.0.2" suffix so it
imports from "@notionhq/client" to allow normal ESM resolution and package
manager control.

import { ConfigurationError } from "@pipedream/platform";
import { NotionToMarkdown } from "notion-to-md";
import NOTION_META from "./common/notion-meta-selection.mjs";
Expand Down
2 changes: 1 addition & 1 deletion components/notion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/notion",
"version": "0.10.1",
"version": "0.10.2",
"description": "Pipedream Notion Components",
"main": "notion.app.mjs",
"keywords": [
Expand Down
Loading