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

test: smoke test with cjs/esm dual package #1644

Merged
merged 4 commits into from
Feb 11, 2025
Merged

Conversation

himself65
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: fbe22d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llamaindex-ts-doc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 6:55am

Copy link

pkg-pr-new bot commented Feb 11, 2025

Open in Stackblitz

@llamaindex/autotool

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/autotool@1644

@llamaindex/cloud

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cloud@1644

@llamaindex/community

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/community@1644

@llamaindex/core

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/core@1644

@llamaindex/env

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/env@1644

@llamaindex/experimental

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/experimental@1644

llamaindex

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/llamaindex@1644

@llamaindex/node-parser

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/node-parser@1644

@llamaindex/readers

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/readers@1644

@llamaindex/wasm-tools

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/wasm-tools@1644

@llamaindex/workflow

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/workflow@1644

@llamaindex/anthropic

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/anthropic@1644

@llamaindex/clip

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/clip@1644

@llamaindex/cohere

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cohere@1644

@llamaindex/deepinfra

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/deepinfra@1644

@llamaindex/google

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/google@1644

@llamaindex/groq

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/groq@1644

@llamaindex/huggingface

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/huggingface@1644

@llamaindex/mistral

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/mistral@1644

@llamaindex/mixedbread

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/mixedbread@1644

@llamaindex/ollama

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/ollama@1644

@llamaindex/openai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/openai@1644

@llamaindex/portkey-ai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/portkey-ai@1644

@llamaindex/replicate

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/replicate@1644

@llamaindex/vercel

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vercel@1644

@llamaindex/vllm

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vllm@1644

commit: fbe22d5

);
await writeFile(filePath, esmCode, "utf-8");

execSync(`${process.argv[0]} ${filePath}`, {

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.
);
await writeFile(filePath, esmCode, "utf-8");

execSync(`${process.argv[0]} ${filePath} -C ${condition}`, {

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.

Copilot Autofix AI 11 days ago

To fix the problem, we should avoid constructing the shell command as a single string and instead use execFileSync to pass the command and its arguments separately. This approach ensures that the shell does not misinterpret any special characters in the arguments.

  • Replace the execSync calls with execFileSync to separate the command and its arguments.
  • Update the imports to include execFileSync from node:child_process.
Suggested changeset 1
e2e/node/smoke.e2e.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/e2e/node/smoke.e2e.ts b/e2e/node/smoke.e2e.ts
--- a/e2e/node/smoke.e2e.ts
+++ b/e2e/node/smoke.e2e.ts
@@ -1,2 +1,2 @@
-import { execSync } from "node:child_process";
+import { execFileSync } from "node:child_process";
 import { mkdir, rm, writeFile } from "node:fs/promises";
@@ -50,3 +50,3 @@
 
-    execSync(`${process.argv[0]} ${filePath}`, {
+    execFileSync(process.argv[0], [filePath], {
       cwd: process.cwd(),
@@ -64,3 +64,3 @@
 
-    execSync(`${process.argv[0]} ${filePath}`, {
+    execFileSync(process.argv[0], [filePath], {
       cwd: process.cwd(),
@@ -80,3 +80,3 @@
 
-      execSync(`${process.argv[0]} ${filePath} -C ${condition}`, {
+      execFileSync(process.argv[0], [filePath, '-C', condition], {
         cwd: process.cwd(),
EOF
@@ -1,2 +1,2 @@
import { execSync } from "node:child_process";
import { execFileSync } from "node:child_process";
import { mkdir, rm, writeFile } from "node:fs/promises";
@@ -50,3 +50,3 @@

execSync(`${process.argv[0]} ${filePath}`, {
execFileSync(process.argv[0], [filePath], {
cwd: process.cwd(),
@@ -64,3 +64,3 @@

execSync(`${process.argv[0]} ${filePath}`, {
execFileSync(process.argv[0], [filePath], {
cwd: process.cwd(),
@@ -80,3 +80,3 @@

execSync(`${process.argv[0]} ${filePath} -C ${condition}`, {
execFileSync(process.argv[0], [filePath, '-C', condition], {
cwd: process.cwd(),
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@himself65 himself65 merged commit 4d94f6e into main Feb 11, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant