-
Notifications
You must be signed in to change notification settings - Fork 454
tsup for stack-shared #647
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
✨ No issues found! Your code is sparkling clean! ✨ 🗒️ View all ignored comments in this repo
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR reorganizes the build system for stack-shared and consolidates ESLint configurations across the repository.
- Moves ESLint configs from
/eslint-configs/
to/configs/eslint/
directory, updating paths across all packages - Introduces new
configs/tsup/js-library.ts
for shared build configuration with custom plugins for 'use client' directives - Switches stack-shared from tsc to tsup-node build system with both ESM/CJS output formats
- Fixes import paths in stack-shared from absolute to relative imports for better compatibility
- Missing tsup-node in devDependencies despite being used in build scripts
💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!
25 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
|
||
// make sure "use client" is at the top of the file | ||
const matchUseClient = /[\s\n\r]*(^|\n|\r|;)\s*['"]use\s+client['"]\s*(\n|\r|;)/im; | ||
if (matchUseClient.test(file.text)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regex in onEnd
callback prepends 'use client'
even if already present at the top, potentially duplicating the directive.
if (matchUseClient.test(file.text)) { | |
if (!matchUseClient.test(file.text)) { |
import path from "path"; | ||
|
||
export const createBasePlugin = (options: { customNoExternal: Set<string> }): Plugin => { | ||
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf-8")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading package.json
synchronously may be fragile if the working directory changes; consider ensuring the correct base path.
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf-8")); | |
const packageJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, "package.json"), "utf-8")); |
Important
Update ESLint config paths and enhance build process with
tsup
across the project.../../eslint-configs/
to../../configs/eslint/
in various.eslintrc
files acrossapps
,examples
, andpackages
..eslintrc
files.configs/tsup/js-library.ts
andconfigs/tsup/plugins.ts
for sharedtsup
configuration.tsup.config.ts
inpackages/stack-shared
andpackages/template
to usecreateJsLibraryTsupConfig
.esbuild
as a dev dependency inpackage.json
.COPY configs ./configs
indocker/server/Dockerfile
to include new config paths.package.json
scripts and dependencies to reflect new build and linting configurations.api-keys.tsx
andpromises.tsx
inpackages/stack-shared
to use relative paths.This description was created by
for 5fb4f5d. You can customize this summary. It will automatically update as commits are pushed.