diff --git a/.circleci/config.yml b/.circleci/config.yml index 140b26aeedf..d39b2a64e2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ default-job: &default-job working_directory: /tmp/mui-toolpad resource_class: medium docker: - - image: cimg/node:18.17.1 + - image: cimg/node:18.19.1 environment: # Keep in sync with "Save playwright cache" PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 45d4c97a977..b02cc02c816 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8 + uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9 with: languages: typescript # If you wish to specify custom queries, you can do so here or in a config file. @@ -29,4 +29,4 @@ jobs: # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8 + uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9 diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index 97ccb36abb0..487e4cb5020 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -29,7 +29,7 @@ jobs: steps: - run: echo "${{ github.actor }}" - name: check if prs are dirty - uses: eps1lon/actions-label-merge-conflict@fd1f295ee7443d13745804bc49fe158e240f6c6e # v2.1.0 + uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e # v3.0.0 with: dirtyLabel: 'PR: out-of-date' removeOnDirtyLabel: 'PR: ready to ship' diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index b44a7458176..b6c6f454847 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -44,6 +44,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8 + uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9 with: sarif_file: results.sarif diff --git a/CHANGELOG.md b/CHANGELOG.md index df4846c12d7..96849251bc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## v0.1.53 + + + +_Mar 22, 2024_ + +A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨: + +Very early first version of @toolpad/core, fix examples, and documentation fixes and updates. + +- ​Remove deprecated dependencies (#3313) @Janpot +- ​Remove lerna isolation (#3312) @Janpot +- ​Toolpad core project setup (#3291) @apedroferreira +- ​isolate lerna in renovatebot @Janpot +- ​Remove renovatebot vitest-fail-on-console exception @Janpot +- ​Fix flaky authentication test: Wait for network idle in tests again (#3290) @apedroferreira +- ​Fix flaky auth test with console error "Failed to fetch" (#3287) @apedroferreira +- ​Update renovate.json @Janpot +- ​[code-infra] Update renove.json (#3288) @Janpot +- ​[core] Lower the frequency of no-response action runs (#3302) @michaldudak +- ​[core] Use Circle CI context @oliviertassinari +- ​[docs] Fix support link (#3306) @oliviertassinari +- ​[docs] Link blog post from examples overview page and some minor edits. (#3299) @prakhargupta1 +- ​[docs] Fix Vale error @oliviertassinari +- ​[docs] Fix some Vale errors (#3293) @oliviertassinari +- ​[examples] @toolpad/studio@0.1.51 doesn't exist @oliviertassinari + +All contributors of this release in alphabetical order: @apedroferreira, @Janpot, @michaldudak, @oliviertassinari, @prakhargupta1 + ## v0.1.52 diff --git a/docs/data/toolpad/studio/concepts/custom-components.md b/docs/data/toolpad/studio/concepts/custom-components.md index 6d757b07b0a..d23da0b6522 100644 --- a/docs/data/toolpad/studio/concepts/custom-components.md +++ b/docs/data/toolpad/studio/concepts/custom-components.md @@ -26,7 +26,6 @@ Toolpad Studio exposes a [`createComponent`](https://mui.com/toolpad/studio/refe ```jsx import * as React from 'react'; -import { Typography } from '@mui/material'; import { createComponent } from '@toolpad/studio/browser'; export interface HelloWorldProps { @@ -34,7 +33,7 @@ export interface HelloWorldProps { } function HelloWorld({ msg }: HelloWorldProps) { - return {msg}; + return
{msg}
; } export default createComponent(HelloWorld, { diff --git a/docs/data/toolpad/studio/getting-started/installation.md b/docs/data/toolpad/studio/getting-started/installation.md index 868de1cf3fc..2919871b807 100644 --- a/docs/data/toolpad/studio/getting-started/installation.md +++ b/docs/data/toolpad/studio/getting-started/installation.md @@ -60,7 +60,7 @@ Start by installing the required dependencies: ```bash npm -pnpm install -S @toolpad/studio +npm install -S @toolpad/studio ``` ```bash yarn diff --git a/docs/package.json b/docs/package.json index 23b6b495703..d80acd4ec23 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.1.52", + "version": "0.1.53", "private": true, "author": "MUI Toolpad", "license": "MIT", @@ -31,7 +31,7 @@ "@mui/lab": "5.0.0-alpha.169", "@mui/material": "5.15.14", "@mui/material-nextjs": "^5.15.11", - "@mui/monorepo": "github:mui/material-ui#b57951355a60566aeafc88c9aa49c7f198968b3c", + "@mui/monorepo": "github:mui/material-ui#0102a9579628d48d784511a562b7b72f0f51847e", "@mui/styles": "5.15.14", "@mui/utils": "5.15.14", "@mui/x-data-grid-pro": "6.19.8", diff --git a/examples/auth-github/package.json b/examples/auth-github/package.json index df72a205739..5285e2dae61 100644 --- a/examples/auth-github/package.json +++ b/examples/auth-github/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/auth-google/package.json b/examples/auth-google/package.json index 85344a96d69..a18d4c97077 100644 --- a/examples/auth-google/package.json +++ b/examples/auth-google/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/basic-crud-app/package.json b/examples/basic-crud-app/package.json index c38d5d67aa4..3ab9600dee3 100644 --- a/examples/basic-crud-app/package.json +++ b/examples/basic-crud-app/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/charts/package.json b/examples/charts/package.json index 5a75f471983..258defca50a 100644 --- a/examples/charts/package.json +++ b/examples/charts/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/custom-datagrid-column/package.json b/examples/custom-datagrid-column/package.json index 8dcdd9b48ed..0833de1d72d 100644 --- a/examples/custom-datagrid-column/package.json +++ b/examples/custom-datagrid-column/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/custom-server-nextjs/package.json b/examples/custom-server-nextjs/package.json index 4f764b2a0df..323afc1d15d 100644 --- a/examples/custom-server-nextjs/package.json +++ b/examples/custom-server-nextjs/package.json @@ -9,9 +9,9 @@ "edit": "toolpad-studio editor http://localhost:3001/my-toolpad-studio-app" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "express": "4.18.2", - "next": "14.1.3", + "next": "14.1.4", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/examples/custom-server/package.json b/examples/custom-server/package.json index aa2b3d859e1..58c0fab6744 100644 --- a/examples/custom-server/package.json +++ b/examples/custom-server/package.json @@ -9,7 +9,7 @@ "edit": "toolpad-studio editor http://localhost:3001/my-app" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "express": "4.18.2" }, "devDependencies": {} diff --git a/examples/datagrid-columns/package.json b/examples/datagrid-columns/package.json index cb17dd9a6fd..08db953947f 100644 --- a/examples/datagrid-columns/package.json +++ b/examples/datagrid-columns/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/dog-app/package.json b/examples/dog-app/package.json index 4baa236f949..cb150a7544d 100644 --- a/examples/dog-app/package.json +++ b/examples/dog-app/package.json @@ -8,6 +8,6 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/google-sheet/package.json b/examples/google-sheet/package.json index 501a3b50328..779ff3d3a0e 100644 --- a/examples/google-sheet/package.json +++ b/examples/google-sheet/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "googleapis": "134.0.0" } } diff --git a/examples/graphql/package.json b/examples/graphql/package.json index 91e9776fff3..60fb65451fc 100644 --- a/examples/graphql/package.json +++ b/examples/graphql/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "graphql": "16.8.1", "graphql-request": "6.1.0", "graphql-tag": "2.12.6" diff --git a/examples/hacker-news-client/package.json b/examples/hacker-news-client/package.json index 549a6e6da3b..f2457979029 100644 --- a/examples/hacker-news-client/package.json +++ b/examples/hacker-news-client/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "^0.1.52", + "@toolpad/studio": "^0.1.53", "axios": "^1.4.0" } } diff --git a/examples/npm-stats/package.json b/examples/npm-stats/package.json index 1a3aeed98ae..524a2476efd 100644 --- a/examples/npm-stats/package.json +++ b/examples/npm-stats/package.json @@ -8,6 +8,6 @@ "start": "NODE_OPTIONS='--max-old-space-size=396' toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" } } diff --git a/examples/qr-generator/package.json b/examples/qr-generator/package.json index 074101c2805..97c69365d61 100644 --- a/examples/qr-generator/package.json +++ b/examples/qr-generator/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "qrcode": "^1.5.3" }, "devDependencies": { diff --git a/examples/react-pages/package.json b/examples/react-pages/package.json index 10d4a4d1dee..77f86c4d3e1 100644 --- a/examples/react-pages/package.json +++ b/examples/react-pages/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@mui/material": "5.15.14", - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "@mui/x-data-grid": "6.19.8", "@tanstack/react-query": "5.18.1" }, diff --git a/examples/stripe-script/package.json b/examples/stripe-script/package.json index 9eeb1ebac48..2a5488d72ae 100644 --- a/examples/stripe-script/package.json +++ b/examples/stripe-script/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "archiver": "7.0.1", "stripe": "^14.14.0" } diff --git a/examples/supabase/package.json b/examples/supabase/package.json index 9c5b6c2b3ad..d6206339053 100644 --- a/examples/supabase/package.json +++ b/examples/supabase/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "@supabase/supabase-js": "2.39.3" } } diff --git a/examples/with-prisma-data-provider/package.json b/examples/with-prisma-data-provider/package.json index 619d627a55e..c7012514961 100644 --- a/examples/with-prisma-data-provider/package.json +++ b/examples/with-prisma-data-provider/package.json @@ -9,7 +9,7 @@ "prisma": "prisma" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "@prisma/client": "5.9.1", "qrcode": "^1.5.3" }, diff --git a/examples/with-prisma/package.json b/examples/with-prisma/package.json index 8b680d92d77..118d5754daf 100644 --- a/examples/with-prisma/package.json +++ b/examples/with-prisma/package.json @@ -9,7 +9,7 @@ "prisma": "prisma" }, "dependencies": { - "@toolpad/studio": "0.1.52", + "@toolpad/studio": "0.1.53", "@prisma/client": "5.9.1", "qrcode": "^1.5.3" }, diff --git a/examples/with-wasm/package.json b/examples/with-wasm/package.json index 7338258a51c..857ff1d3a6c 100644 --- a/examples/with-wasm/package.json +++ b/examples/with-wasm/package.json @@ -8,7 +8,7 @@ "start": "toolpad-studio start" }, "dependencies": { - "@toolpad/studio": "0.1.52" + "@toolpad/studio": "0.1.53" }, "devDependencies": { "assemblyscript": "0.27.25" diff --git a/lerna.json b/lerna.json index 19dab3171e8..64f796a430d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "0.1.52", + "version": "0.1.53", "npmClient": "pnpm" } diff --git a/package.json b/package.json index 7e86eb46334..10cc4b344a0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "markdownlint": "markdownlint-cli2 \"**/*.md\"", "prettier": "pretty-quick --ignore-path .eslintignore", "prettier:all": "prettier --write . --ignore-path .eslintignore", - "deduplicate": "node scripts/deduplicate.mjs", "dev": "dotenv cross-env FORCE_COLOR=1 lerna -- run dev --stream --parallel --ignore docs", "docs:dev": "pnpm --filter docs dev", "docs:build": "pnpm --filter docs build", @@ -40,15 +39,14 @@ }, "devDependencies": { "@argos-ci/core": "1.5.5", - "@mui/monorepo": "github:mui/material-ui#b57951355a60566aeafc88c9aa49c7f198968b3c", + "@mui/monorepo": "github:mui/material-ui#0102a9579628d48d784511a562b7b72f0f51847e", "@mui/x-charts": "6.19.8", - "@next/eslint-plugin-next": "14.1.3", + "@next/eslint-plugin-next": "14.1.4", "@playwright/test": "1.42.1", "@testing-library/react": "14.2.1", "@types/archiver": "6.0.2", "@types/gtag.js": "0.0.19", "@types/node": "20.11.28", - "@types/rimraf": "3.0.2", "@typescript-eslint/eslint-plugin": "7.2.0", "@typescript-eslint/parser": "7.2.0", "chalk": "5.3.0", @@ -79,8 +77,7 @@ "rimraf": "5.0.5", "typescript": "5.4.2", "vitest-dom": "0.1.1", - "vitest-fail-on-console": "0.5.1", - "yarn-deduplicate": "6.0.2" + "vitest-fail-on-console": "0.5.1" }, "dependencies": { "archiver": "7.0.0", @@ -100,10 +97,10 @@ "engines": { "npm": "please-use-pnpm", "node": ">=18", - "pnpm": "8.15.4" + "pnpm": "8.15.5" }, "resolutions": { "google-auth-library": "*" }, - "packageManager": "pnpm@8.15.4" + "packageManager": "pnpm@8.15.5" } diff --git a/packages/create-toolpad-app/package.json b/packages/create-toolpad-app/package.json index 441d0d76251..bcc04ea0819 100644 --- a/packages/create-toolpad-app/package.json +++ b/packages/create-toolpad-app/package.json @@ -1,6 +1,6 @@ { "name": "create-toolpad-app", - "version": "0.1.52", + "version": "0.1.53", "keywords": [ "react", "toolpad", diff --git a/packages/create-toolpad-app/public/gitignoreTemplate b/packages/create-toolpad-app/public/gitignoreTemplate index a56149af866..c8142b9775a 100644 --- a/packages/create-toolpad-app/public/gitignoreTemplate +++ b/packages/create-toolpad-app/public/gitignoreTemplate @@ -1,78 +1,99 @@ # Logs + logs -*.log -npm-debug.log* +_.log +npm-debug.log_ yarn-debug.log* yarn-error.log* lerna-debug.log* .pnpm-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # Runtime data + pids -*.pid -*.seed -*.pid.lock +_.pid +_.seed +\*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover + lib-cov # Coverage directory used by tools like istanbul + coverage -*.lcov +\*.lcov # nyc test coverage + .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + .grunt # Bower dependency directory (https://bower.io/) + bower_components # node-waf configuration + .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) + build/Release # Dependency directories + node_modules/ jspm_packages/ # Snowpack dependency directory (https://snowpack.dev/) + web_modules/ # TypeScript cache -*.tsbuildinfo + +\*.tsbuildinfo # Optional npm cache directory + .npm # Optional eslint cache + .eslintcache # Optional stylelint cache + .stylelintcache # Microbundle cache + .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history + .node_repl_history # Output of 'npm pack' -*.tgz + +\*.tgz # Yarn Integrity file + .yarn-integrity # dotenv environment variable files + .env .env.development.local .env.test.local @@ -80,49 +101,65 @@ web_modules/ .env.local # parcel-bundler cache (https://parceljs.org/) + .cache .parcel-cache # Next.js build output + .next out # Nuxt.js build / generate output + .nuxt dist # Gatsby files + .cache/ + # Comment in the public line in if your project uses Gatsby and not Next.js + # https://nextjs.org/blog/next-9-1#public-directory-support + # public # vuepress build output + .vuepress/dist # vuepress v2.x temp and cache directory + .temp .cache # Docusaurus cache and generated files + .docusaurus # Serverless directories + .serverless/ # FuseBox cache + .fusebox/ # DynamoDB Local files + .dynamodb/ # TernJS port file + .tern-port # Stores VSCode versions used for testing VSCode extensions + .vscode-test # yarn v2 + .yarn/cache .yarn/unplugged .yarn/build-state.yml diff --git a/packages/create-toolpad-app/src/generateProject.ts b/packages/create-toolpad-app/src/generateProject.ts new file mode 100644 index 00000000000..3355f0debd9 --- /dev/null +++ b/packages/create-toolpad-app/src/generateProject.ts @@ -0,0 +1,409 @@ +import path from 'path'; +import { PackageJson } from './packageType'; + +interface GenerateProjectOptions { + name: string; +} + +export default function generateProject( + options: GenerateProjectOptions, +): Map { + const rootLayoutContent = ` + import { AppProvider } from '@toolpad/core'; + import theme from '../theme'; + + export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { + return ( + + + {children} + + + ); + } + `; + + const dashboardLayoutContent = ` + import { + AppBar, + Badge, + Box, + Container, + Divider, + Drawer, + IconButton, + List, + ListItemButton, + ListItemIcon, + Toolbar, + } from "@mui/material"; + + import HomeIcon from "@mui/icons-material/Home"; + import SettingsIcon from "@mui/icons-material/Settings"; + import NotificationsIcon from "@mui/icons-material/Notifications"; + + export default function Layout({ + children, + }: Readonly<{ children: React.ReactNode }>) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {children} + + + ); + } + `; + + const rootPageContent = ` + import Link from "next/link"; + import { Button, Container, Typography, Box } from "@mui/material"; + + export default function Home() { + return ( + + + + Welcome to{" "} + + Toolpad Core! + + + + + Get started by editing (dashboard)/page/page.tsx + + + + + + + + + + ); + } + `; + + const dashboardPageContent = ` + import { Typography, Container } from "@mui/material"; + export default function Home() { + return ( +
+ + + Dashboard content! + + +
+ ); + } + `; + + const themeContent = ` + "use client" + import { Roboto } from "next/font/google"; + import { createTheme } from "@mui/material/styles"; + + const roboto = Roboto({ + weight: ["300", "400", "500", "700"], + subsets: ["latin"], + display: "swap", + }); + + const theme = createTheme({ + typography: { + fontFamily: roboto.style.fontFamily, + }, + components: { + MuiAppBar: { + styleOverrides: { + root: { + boxShadow: "none", + }, + }, + }, + MuiList: { + styleOverrides: { + root: { + padding: 0, + }, + }, + }, + MuiListItemIcon: { + styleOverrides: { + root: { + minWidth: "28px", + }, + }, + }, + }, + }); + + export default theme; + `; + + const eslintConfigContent = `{ + "extends": "next/core-web-vitals" + } + `; + + const nextTypesContent = `/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. + `; + + const nextConfigContent = ` + /** @type {import('next').NextConfig} */ + const nextConfig = {}; + export default nextConfig; + `; + + const tsConfigContent = `{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] + } + `; + + const packageJson: PackageJson = { + name: path.basename(options.name), + version: '0.1.0', + scripts: { + dev: 'next dev', + build: 'next build', + start: 'next start', + lint: 'next lint', + }, + dependencies: { + react: '^18', + 'react-dom': '^18', + next: '^14', + '@toolpad/core': 'latest', + '@mui/material': '^5', + '@mui/icons-material': '^5', + '@emotion/react': '^11', + '@emotion/styled': '^11', + '@emotion/cache': '^11', + }, + devDependencies: { + typescript: '^5', + '@types/node': '^20', + '@types/react': '^18', + '@types/react-dom': '^18', + eslint: '^8', + 'eslint-config-next': '^14', + }, + }; + + const gitignoreTemplate = ` + # Logs + logs + *.log + npm-debug.log* + yarn-debug.log* + yarn-error.log* + lerna-debug.log* + .pnpm-debug.log* + + # Diagnostic reports (https://nodejs.org/api/report.html) + report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + + # Runtime data + pids + *.pid + *.seed + *.pid.lock + + # Directory for instrumented libs generated by jscoverage/JSCover + lib-cov + + # Coverage directory used by tools like istanbul + coverage + *.lcov + + # nyc test coverage + .nyc_output + + # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + .grunt + + # Bower dependency directory (https://bower.io/) + bower_components + + # node-waf configuration + .lock-wscript + + # Compiled binary addons (https://nodejs.org/api/addons.html) + build/Release + + # Dependency directories + node_modules/ + jspm_packages/ + + # Snowpack dependency directory (https://snowpack.dev/) + web_modules/ + + # TypeScript cache + *.tsbuildinfo + + # Optional npm cache directory + .npm + + # Optional eslint cache + .eslintcache + + # Optional stylelint cache + .stylelintcache + + # Microbundle cache + .rpt2_cache/ + .rts2_cache_cjs/ + .rts2_cache_es/ + .rts2_cache_umd/ + + # Optional REPL history + .node_repl_history + + # Output of 'npm pack' + *.tgz + + # Yarn Integrity file + .yarn-integrity + + # dotenv environment variable files + .env + .env.development.local + .env.test.local + .env.production.local + .env.local + + # parcel-bundler cache (https://parceljs.org/) + .cache + .parcel-cache + + # Next.js build output + .next + out + + # Nuxt.js build / generate output + .nuxt + dist + + # Gatsby files + .cache/ + # Comment in the public line in if your project uses Gatsby and not Next.js + # https://nextjs.org/blog/next-9-1#public-directory-support + # public + + # vuepress build output + .vuepress/dist + + # vuepress v2.x temp and cache directory + .temp + .cache + + # Docusaurus cache and generated files + .docusaurus + + # Serverless directories + .serverless/ + + # FuseBox cache + .fusebox/ + + # DynamoDB Local files + .dynamodb/ + + # TernJS port file + .tern-port + + # Stores VSCode versions used for testing VSCode extensions + .vscode-test + + # yarn v2 + .yarn/cache + .yarn/unplugged + .yarn/build-state.yml + .yarn/install-state.gz + `; + + // Define all files to be created up front + return new Map([ + ['app/api/auth/[...nextAuth]/route.ts', { content: '' }], + ['app/auth/[...path]/page.tsx', { content: '' }], + ['app/(dashboard)/page/page.tsx', { content: dashboardPageContent }], + ['app/(dashboard)/layout.tsx', { content: dashboardLayoutContent }], + ['app/layout.tsx', { content: rootLayoutContent }], + ['app/page.tsx', { content: rootPageContent }], + ['theme.ts', { content: themeContent }], + ['next-env.d.ts', { content: nextTypesContent }], + ['next.config.mjs', { content: nextConfigContent }], + ['.eslintrc.json', { content: eslintConfigContent }], + ['tsconfig.json', { content: tsConfigContent }], + ['package.json', { content: JSON.stringify(packageJson, null, 2) }], + ['.gitignore', { content: gitignoreTemplate }], + // ... + ]); +} diff --git a/packages/create-toolpad-app/src/index.ts b/packages/create-toolpad-app/src/index.ts index 8a5c2c7dbd0..e8c17ef0631 100644 --- a/packages/create-toolpad-app/src/index.ts +++ b/packages/create-toolpad-app/src/index.ts @@ -7,12 +7,14 @@ import yargs from 'yargs'; import inquirer from 'inquirer'; import chalk from 'chalk'; import { errorFrom } from '@toolpad/utils/errors'; -import { execaCommand } from 'execa'; +import { execa } from 'execa'; import { satisfies } from 'semver'; import { readJsonFile } from '@toolpad/utils/fs'; import invariant from 'invariant'; import { bashResolvePath } from '@toolpad/utils/cli'; import { PackageJson } from './packageType'; +import generateProject from './generateProject'; +import writeFiles from './writeFiles'; import { downloadAndExtractExample } from './examples'; type PackageManager = 'npm' | 'pnpm' | 'yarn'; @@ -36,7 +38,7 @@ function getPackageManager(): PackageManager { return 'npm'; } } - return 'yarn'; + return 'npm'; } // From https://github.com/vercel/next.js/blob/canary/packages/create-next-app/helpers/is-folder-empty.ts @@ -91,7 +93,7 @@ const validatePath = async (relativePath: string): Promise => if (await isFolderEmpty(absolutePath)) { return true; } - return `${chalk.red('error')} - The directory at ${chalk.blue( + return `${chalk.red('error')} - The directory at ${chalk.cyan( absolutePath, )} contains files that could conflict. Either use a new directory, or remove conflicting files.`; } catch (rawError: unknown) { @@ -112,7 +114,7 @@ const scaffoldProject = async (absolutePath: string, installFlag: boolean): Prom console.log(); // eslint-disable-next-line no-console console.log( - `${chalk.blue('info')} - Creating Toolpad Studio project in ${chalk.blue(absolutePath)}`, + `${chalk.cyan('info')} - Creating Toolpad Studio project in ${chalk.cyan(absolutePath)}`, ); // eslint-disable-next-line no-console console.log(); @@ -132,11 +134,11 @@ const scaffoldProject = async (absolutePath: string, installFlag: boolean): Prom const DEFAULT_GENERATED_GITIGNORE_FILE = '.gitignore'; // eslint-disable-next-line no-console - console.log(`${chalk.blue('info')} - Initializing package.json file`); + console.log(`${chalk.cyan('info')} - Initializing package.json file`); await fs.writeFile(path.join(absolutePath, 'package.json'), JSON.stringify(packageJson, null, 2)); // eslint-disable-next-line no-console - console.log(`${chalk.blue('info')} - Initializing .gitignore file`); + console.log(`${chalk.cyan('info')} - Initializing .gitignore file`); await fs.copyFile( path.resolve(__dirname, `./gitignoreTemplate`), path.join(absolutePath, DEFAULT_GENERATED_GITIGNORE_FILE), @@ -144,13 +146,11 @@ const scaffoldProject = async (absolutePath: string, installFlag: boolean): Prom if (installFlag) { // eslint-disable-next-line no-console - console.log(`${chalk.blue('info')} - Installing dependencies`); + console.log(`${chalk.cyan('info')} - Installing dependencies`); // eslint-disable-next-line no-console console.log(); - const installVerb = packageManager === 'yarn' ? 'add' : 'install'; - const command = `${packageManager} ${installVerb} @toolpad/studio`; - await execaCommand(command, { stdio: 'inherit', cwd: absolutePath }); + await execa(packageManager, ['install'], { stdio: 'inherit', cwd: absolutePath }); // eslint-disable-next-line no-console console.log(); @@ -161,6 +161,35 @@ const scaffoldProject = async (absolutePath: string, installFlag: boolean): Prom } }; +const scaffoldCoreProject = async (absolutePath: string): Promise => { + // eslint-disable-next-line no-console + console.log(); + // eslint-disable-next-line no-console + console.log( + `${chalk.cyan('info')} - Creating Toolpad Core project in ${chalk.cyan(absolutePath)}`, + ); + // eslint-disable-next-line no-console + console.log(); + const files = generateProject({ name: path.basename(absolutePath) }); + await writeFiles(absolutePath, files); + + // eslint-disable-next-line no-console + console.log(`${chalk.cyan('info')} - Installing dependencies`); + // eslint-disable-next-line no-console + console.log(); + + await execa(packageManager, ['install'], { stdio: 'inherit', cwd: absolutePath }); + + // eslint-disable-next-line no-console + console.log(); + // eslint-disable-next-line no-console + console.log( + `${chalk.green('success')} - Created Toolpad Core project at ${chalk.cyan(absolutePath)}`, + ); + // eslint-disable-next-line no-console + console.log(); +}; + // Run the CLI interaction with Inquirer.js const run = async () => { const pkgJson: PackageJson = (await readJsonFile( @@ -187,6 +216,11 @@ const run = async () => { type: 'string', describe: 'The path where the Toolpad Studio project directory will be created', }) + .option('core', { + type: 'boolean', + describe: 'Create a new project with Toolpad Core', + default: false, + }) .option('install', { type: 'boolean', describe: 'Install dependencies', @@ -197,11 +231,11 @@ const run = async () => { describe: 'The name of one of the available examples. See https://github.com/mui/mui-toolpad/tree/master/examples.', }) - .help().argv; const pathArg = args._?.[0] as string; const installFlag = args.install as boolean; + const coreFlag = args.core as boolean; if (pathArg) { const pathValidOrError = await validatePath(pathArg); @@ -233,6 +267,8 @@ const run = async () => { if (args.example) { await downloadAndExtractExample(absolutePath, args.example); + } else if (coreFlag) { + await scaffoldCoreProject(absolutePath); } else { await scaffoldProject(absolutePath, installFlag); } diff --git a/packages/create-toolpad-app/src/writeFiles.ts b/packages/create-toolpad-app/src/writeFiles.ts new file mode 100644 index 00000000000..5d35d4dcba5 --- /dev/null +++ b/packages/create-toolpad-app/src/writeFiles.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import fs from 'fs/promises'; + +export default async function writeFiles( + absolutePath: string, + files: Map, +): Promise { + // Get all directories and deduplicate + const dirs = new Set(Array.from(files.keys(), (filePath) => path.dirname(filePath))); + + // Create directories, use recursive option to create parent directories + await Promise.all( + Array.from(dirs, (dirPath) => fs.mkdir(path.join(absolutePath, dirPath), { recursive: true })), + ); + + // Write all the files + await Promise.all( + Array.from(files.entries(), ([filePath, { content }]) => + fs.writeFile(path.join(absolutePath, filePath), content), + ), + ); +} diff --git a/packages/eslint-plugin-material-ui/package.json b/packages/eslint-plugin-material-ui/package.json index 7912b8875b5..2085a0d01ea 100644 --- a/packages/eslint-plugin-material-ui/package.json +++ b/packages/eslint-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-material-ui", - "version": "0.1.52", + "version": "0.1.53", "private": true, "description": "Custom eslint rules for MUI.", "main": "src/index.js", diff --git a/packages/toolpad-core/package.json b/packages/toolpad-core/package.json index 97aac032dfa..6711a1a9442 100644 --- a/packages/toolpad-core/package.json +++ b/packages/toolpad-core/package.json @@ -1,6 +1,6 @@ { "name": "@toolpad/core", - "version": "0.0.1", + "version": "0.1.53", "keywords": [ "toolpad" ], diff --git a/packages/toolpad-studio-components/package.json b/packages/toolpad-studio-components/package.json index dfbd88bdd6e..4a8796a3bc9 100644 --- a/packages/toolpad-studio-components/package.json +++ b/packages/toolpad-studio-components/package.json @@ -1,6 +1,6 @@ { "name": "@toolpad/studio-components", - "version": "0.1.52", + "version": "0.1.53", "description": "Build MUI apps quickly", "author": "MUI Toolpad team", "homepage": "https://github.com/mui/mui-toolpad#readme", diff --git a/packages/toolpad-studio-runtime/package.json b/packages/toolpad-studio-runtime/package.json index e14fd37f247..6179d97bf43 100644 --- a/packages/toolpad-studio-runtime/package.json +++ b/packages/toolpad-studio-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@toolpad/studio-runtime", - "version": "0.1.52", + "version": "0.1.53", "description": "Build MUI apps quickly", "author": "MUI Toolpad team", "homepage": "https://github.com/mui/mui-toolpad#readme", diff --git a/packages/toolpad-studio/package.json b/packages/toolpad-studio/package.json index 9791e1e7177..c9838d52b83 100644 --- a/packages/toolpad-studio/package.json +++ b/packages/toolpad-studio/package.json @@ -1,6 +1,6 @@ { "name": "@toolpad/studio", - "version": "0.1.52", + "version": "0.1.53", "license": "MIT", "bin": { "toolpad-studio": "./cli.mjs" @@ -145,7 +145,6 @@ "@types/lodash-es": "4.17.12", "@types/node-fetch": "2.6.11", "@types/pg": "8.11.2", - "@types/prettier": "2.7.3", "@types/react": "18.2.66", "@types/react-dom": "18.2.22", "@types/react-is": "18.2.4", diff --git a/packages/toolpad-studio/src/server/localMode.ts b/packages/toolpad-studio/src/server/localMode.ts index c4f5272ebe4..ef642c9ae8b 100644 --- a/packages/toolpad-studio/src/server/localMode.ts +++ b/packages/toolpad-studio/src/server/localMode.ts @@ -11,7 +11,7 @@ import { glob } from 'glob'; import * as chokidar from 'chokidar'; import { debounce, throttle } from 'lodash-es'; import { Emitter } from '@toolpad/utils/events'; -import { guessTitle } from '@toolpad/utils/strings'; +import { guessTitle, isValidJsIdentifier } from '@toolpad/utils/strings'; import { errorFrom } from '@toolpad/utils/errors'; import { filterValues, hasOwnProperty, mapValues } from '@toolpad/utils/collections'; import { execa } from 'execa'; @@ -233,7 +233,6 @@ async function createDefaultCodeComponent(name: string, filePath: string): Promi const result = await format( ` import * as React from 'react'; - import { Typography } from '@mui/material'; import { createComponent } from '@toolpad/studio/browser'; export interface ${propTypeId} { @@ -242,7 +241,7 @@ async function createDefaultCodeComponent(name: string, filePath: string): Promi function ${componentId}({ msg }: ${propTypeId}) { return ( - {msg} +
{msg}
); } @@ -1239,14 +1238,15 @@ class ToolpadProject { async buildComponentsManifest(): Promise { const componentsFolder = getComponentsFolder(this.getRoot()); - const entries = (await readMaybeDir(componentsFolder)) || []; - const result = entries.map((entry) => { - if (entry.isFile()) { - const fileName = entry.name; - const componentName = entry.name.replace(/\.tsx$/, ''); + const entries = await glob(['*.tsx'], { cwd: componentsFolder }); + const result = entries.map((fileName) => { + const componentName = fileName.replace(/\.tsx$/, ''); + if (isValidJsIdentifier(componentName)) { const filePath = path.resolve(componentsFolder, fileName); return { name: componentName, path: filePath }; } + // eslint-disable-next-line no-console + console.log(`Invalid component name: ${componentName}`); return null; }); return result.filter(Boolean); diff --git a/packages/toolpad-studio/src/server/toolpadAppBuilder.ts b/packages/toolpad-studio/src/server/toolpadAppBuilder.ts index 678cb3f0a99..48a38d2b9dc 100644 --- a/packages/toolpad-studio/src/server/toolpadAppBuilder.ts +++ b/packages/toolpad-studio/src/server/toolpadAppBuilder.ts @@ -20,12 +20,6 @@ const TOOLPAD_BUILD = process.env.GIT_SHA1?.slice(0, 7) || 'dev'; const MAIN_ENTRY = '/main.tsx'; const EDITOR_ENTRY = '/editor.tsx'; -const FALLBACK_MODULES = [ - '@mui/material', - '@mui/icons-material', - '@mui/x-data-grid', - '@mui/x-charts', -]; function getHtmlContent(entry: string) { return ` @@ -62,20 +56,10 @@ function toolpadStudioVitePlugin(): Plugin { return { name: 'toolpad-studio', - async resolveId(id, parent) { + async resolveId(id) { if (id.endsWith('.html')) { return id; } - const hasFallback = FALLBACK_MODULES.some( - (moduleName) => moduleName === id || id.startsWith(`${moduleName}/`), - ); - if (hasFallback) { - const [userMod, fallbackMod] = await Promise.all([ - this.resolve(id, parent), - this.resolve(id, currentDirectory), - ]); - return userMod || fallbackMod; - } return null; }, @@ -314,7 +298,6 @@ if (import.meta.hot) { }, envFile: false, resolve: { - dedupe: FALLBACK_MODULES, alias: [ { // FIXME(https://github.com/mui/material-ui/issues/35233) @@ -364,7 +347,6 @@ if (import.meta.hot) { optimizeDeps: { force: !process.env.EXPERIMENTAL_INLINE_CANVAS && toolpadDevMode ? true : undefined, include: [ - ...FALLBACK_MODULES.map((moduleName) => `@toolpad/studio > ${moduleName}`), ...(process.env.EXPERIMENTAL_INLINE_CANVAS && dev ? [ 'perf-cascade', diff --git a/packages/toolpad-studio/src/toolpadDataSources/rest/client.tsx b/packages/toolpad-studio/src/toolpadDataSources/rest/client.tsx index 4a628f71abd..fde17a07d1a 100644 --- a/packages/toolpad-studio/src/toolpadDataSources/rest/client.tsx +++ b/packages/toolpad-studio/src/toolpadDataSources/rest/client.tsx @@ -63,7 +63,7 @@ import useFetchPrivate from '../useFetchPrivate'; import QueryPreview from '../QueryPreview'; import { usePrivateQuery } from '../context'; -const HTTP_METHODS = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD']; +const HTTP_METHODS = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS']; const QUERY_SCOPE_META: ScopeMeta = { parameters: { diff --git a/packages/toolpad-utils/package.json b/packages/toolpad-utils/package.json index 4851feb381a..f2c2a02156b 100644 --- a/packages/toolpad-utils/package.json +++ b/packages/toolpad-utils/package.json @@ -1,6 +1,6 @@ { "name": "@toolpad/utils", - "version": "0.1.52", + "version": "0.1.53", "description": "Build MUI apps quickly", "author": "MUI Toolpad team", "homepage": "https://github.com/mui/mui-toolpad#readme", @@ -67,7 +67,6 @@ "devDependencies": { "@types/express": "4.17.21", "@types/invariant": "2.2.37", - "@types/prettier": "2.7.3", "@types/react": "18.2.66", "@types/react-is": "18.2.4", "@types/title": "3.4.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 451ae9702d7..bc81fe1079c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,14 +55,14 @@ importers: specifier: 1.5.5 version: 1.5.5 '@mui/monorepo': - specifier: github:mui/material-ui#b57951355a60566aeafc88c9aa49c7f198968b3c - version: github.com/mui/material-ui/b57951355a60566aeafc88c9aa49c7f198968b3c + specifier: github:mui/material-ui#0102a9579628d48d784511a562b7b72f0f51847e + version: github.com/mui/material-ui/0102a9579628d48d784511a562b7b72f0f51847e '@mui/x-charts': specifier: 6.19.8 version: 6.19.8(@mui/material@5.15.14)(@mui/system@5.15.14)(react-dom@18.2.0)(react@18.2.0) '@next/eslint-plugin-next': - specifier: 14.1.3 - version: 14.1.3 + specifier: 14.1.4 + version: 14.1.4 '@playwright/test': specifier: 1.42.1 version: 1.42.1 @@ -78,9 +78,6 @@ importers: '@types/node': specifier: 20.11.28 version: 20.11.28 - '@types/rimraf': - specifier: 3.0.2 - version: 3.0.2 '@typescript-eslint/eslint-plugin': specifier: 7.2.0 version: 7.2.0(@typescript-eslint/parser@7.2.0)(eslint@8.57.0)(typescript@5.4.2) @@ -174,9 +171,6 @@ importers: vitest-fail-on-console: specifier: 0.5.1 version: 0.5.1(jsdom@24.0.0) - yarn-deduplicate: - specifier: 6.0.2 - version: 6.0.2 docs: dependencies: @@ -226,8 +220,8 @@ importers: specifier: ^5.15.11 version: 5.15.11(@emotion/cache@11.11.0)(@emotion/server@11.11.0)(@mui/material@5.15.14)(next@13.5.6)(react@18.2.0) '@mui/monorepo': - specifier: github:mui/material-ui#b57951355a60566aeafc88c9aa49c7f198968b3c - version: github.com/mui/material-ui/b57951355a60566aeafc88c9aa49c7f198968b3c + specifier: github:mui/material-ui#0102a9579628d48d784511a562b7b72f0f51847e + version: github.com/mui/material-ui/0102a9579628d48d784511a562b7b72f0f51847e '@mui/styles': specifier: 5.15.14 version: 5.15.14(react@18.2.0) @@ -830,9 +824,6 @@ importers: '@types/pg': specifier: 8.11.2 version: 8.11.2 - '@types/prettier': - specifier: 2.7.3 - version: 2.7.3 '@types/react': specifier: 18.2.66 version: 18.2.66 @@ -1034,9 +1025,6 @@ importers: '@types/invariant': specifier: 2.2.37 version: 2.2.37 - '@types/prettier': - specifier: 2.7.3 - version: 2.7.3 '@types/react': specifier: 18.2.66 version: 18.2.66 @@ -3883,8 +3871,8 @@ packages: resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==} dev: false - /@next/eslint-plugin-next@14.1.3: - resolution: {integrity: sha512-VCnZI2cy77Yaj3L7Uhs3+44ikMM1VD/fBMwvTBb3hIaTIuqa+DmG4dhUDq+MASu3yx97KhgsVJbsas0XuiKyww==} + /@next/eslint-plugin-next@14.1.4: + resolution: {integrity: sha512-n4zYNLSyCo0Ln5b7qxqQeQ34OZKXwgbdcx6kmkQbywr+0k6M3Vinft0T72R6CDAcDrne2IAgSud4uWCzFgc5HA==} dependencies: glob: 10.3.10 dev: true @@ -5041,10 +5029,6 @@ packages: pg-types: 4.0.2 dev: true - /@types/prettier@2.7.3: - resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} - dev: true - /@types/promise.allsettled@1.0.6: resolution: {integrity: sha512-wA0UT0HeT2fGHzIFV9kWpYz5mdoyLxKrTgMdZQM++5h6pYAFH73HXcQhefg24nD1yivUFEn5KU+EF4b+CXJ4Wg==} @@ -5139,13 +5123,6 @@ packages: /@types/retry@0.12.0: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} - /@types/rimraf@3.0.2: - resolution: {integrity: sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==} - dependencies: - '@types/glob': 8.1.0 - '@types/node': 20.11.28 - dev: true - /@types/scheduler@0.16.8: resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} @@ -6929,11 +6906,6 @@ packages: dependencies: delayed-stream: 1.0.0 - /commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - dev: true - /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -15910,17 +15882,6 @@ packages: y18n: 5.0.8 yargs-parser: 21.1.1 - /yarn-deduplicate@6.0.2: - resolution: {integrity: sha512-Efx4XEj82BgbRJe5gvQbZmEO7pU5DgHgxohYZp98/+GwPqdU90RXtzvHirb7hGlde0sQqk5G3J3Woyjai8hVqA==} - engines: {node: '>=v14', yarn: '>=1 <2'} - hasBin: true - dependencies: - '@yarnpkg/lockfile': 1.1.0 - commander: 10.0.1 - semver: 7.5.4 - tslib: 2.6.2 - dev: true - /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -15968,10 +15929,10 @@ packages: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: false - github.com/mui/material-ui/b57951355a60566aeafc88c9aa49c7f198968b3c: - resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/b57951355a60566aeafc88c9aa49c7f198968b3c} + github.com/mui/material-ui/0102a9579628d48d784511a562b7b72f0f51847e: + resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/0102a9579628d48d784511a562b7b72f0f51847e} name: '@mui/monorepo' - version: 5.15.13 + version: 5.15.14 requiresBuild: true dependencies: '@googleapis/sheets': 5.0.5 diff --git a/renovate.json b/renovate.json index ea558eb20a8..c0367f4020a 100644 --- a/renovate.json +++ b/renovate.json @@ -68,9 +68,9 @@ "allowedVersions": "< 2.0.0" }, { - "groupName": "Next.js", + "groupName": "Unsupported engines", "matchPackageNames": ["next"], - "matchPackagePatterns": ["^@next/"], + "matchPackagePatterns": ["^@next/", "^@typescript-eslint/"], "description": "Restricted to a Node.js version that's unsupported on codesandboxci" }, { @@ -78,6 +78,11 @@ "matchPackageNames": ["superjson"], "description": "they added a feature that breaks our app: https://github.com/blitz-js/superjson/pull/267. See https://github.com/blitz-js/superjson/issues/279" }, + { + "groupName": "Auth.js", + "matchPackageNames": ["@auth/core"], + "description": "Breaking change in https://github.com/nextauthjs/next-auth/issues/10289" + }, { "matchDepTypes": ["action"], "pinDigests": true diff --git a/test/integration/codeComponents/fixture/toolpad/components/tsconfig.json b/test/integration/codeComponents/fixture/toolpad/components/tsconfig.json new file mode 100644 index 00000000000..beb8db0d4d3 --- /dev/null +++ b/test/integration/codeComponents/fixture/toolpad/components/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "jsx": "preserve", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ESNext", "DOM"] + }, + "include": ["*.tsx"] +} diff --git a/test/package.json b/test/package.json index e9a749e3f67..30c7172a15b 100644 --- a/test/package.json +++ b/test/package.json @@ -11,5 +11,6 @@ "react": "18.2.0", "react-dom": "18.2.0" }, - "type": "module" + "type": "module", + "version": "0.1.53" }