mirror of
https://github.com/n8n-io/n8n.git
synced 2024-08-17 09:00:30 +03:00
fix: Run dev command only for core packages (no-changelog) (#7928)
## Summary Provide details about your pull request and what it adds, fixes, or changes. Photos and videos are recommended. - Filters out `@n8n/chat` and `n8n-design-system` from `pnpm run dev` - Fixes dev/build error appearing due to code string `import ... from '@n8n/chat'` #### How to test the change: 1. `pnpm run dev` should work as expected 2. The command should not run for the two packages above 3. The error regarding `@n8n/chat` should no longer appear ## Issues fixed Include links to Github issue or Community forum post or **Linear ticket**: > Important in order to close automatically and provide context to reviewers https://linear.app/n8n/issue/PAY-1089/run-dev-command-only-for-core-packages ## Review / Merge checklist - [x] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [x] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [x] Tests included. N/A > A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. > > *(internal)* You can use Slack commands to trigger [e2e tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227) or [deploy test instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce) or [deploy early access version on Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e).
This commit is contained in:
parent
885dba6f12
commit
92fa6233d3
@ -14,7 +14,7 @@
|
|||||||
"build:backend": "pnpm --filter=!@n8n/chat --filter=!n8n-design-system --filter=!n8n-editor-ui build",
|
"build:backend": "pnpm --filter=!@n8n/chat --filter=!n8n-design-system --filter=!n8n-editor-ui build",
|
||||||
"build:frontend": "pnpm --filter=@n8n/chat --filter=n8n-design-system --filter=n8n-editor-ui build",
|
"build:frontend": "pnpm --filter=@n8n/chat --filter=n8n-design-system --filter=n8n-editor-ui build",
|
||||||
"typecheck": "turbo run typecheck",
|
"typecheck": "turbo run typecheck",
|
||||||
"dev": "turbo run dev --parallel",
|
"dev": "turbo run dev --parallel --filter=!n8n-design-system --filter=!@n8n/chat",
|
||||||
"dev:ai": "turbo run dev --parallel --filter=@n8n/nodes-langchain --filter=n8n --filter=n8n-core",
|
"dev:ai": "turbo run dev --parallel --filter=@n8n/nodes-langchain --filter=n8n --filter=n8n-core",
|
||||||
"clean": "turbo run clean --parallel",
|
"clean": "turbo run clean --parallel",
|
||||||
"format": "turbo run format && node scripts/format.mjs",
|
"format": "turbo run format && node scripts/format.mjs",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "@n8n/chat",
|
"name": "@n8n/chat",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run storybook",
|
"dev": "pnpm run storybook",
|
||||||
"build": "run-p type-check build:vite && npm run build:prepare",
|
"build": "run-p type-check build:vite && npm run build:prepare",
|
||||||
"build:vite": "vite build && npm run build:vite:full",
|
"build:vite": "vite build && npm run build:vite:full",
|
||||||
"build:vite:full": "INCLUDE_VUE=true vite build",
|
"build:vite:full": "INCLUDE_VUE=true vite build",
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"url": "git+https://github.com/n8n-io/n8n.git"
|
"url": "git+https://github.com/n8n-io/n8n.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "pnpm run storybook",
|
||||||
"clean": "rimraf dist .turbo",
|
"clean": "rimraf dist .turbo",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"typecheck": "vue-tsc --declaration --emitDeclarationOnly",
|
"typecheck": "vue-tsc --declaration --emitDeclarationOnly",
|
||||||
|
@ -57,9 +57,10 @@ function indentLines(code: string, indent: string = ' ') {
|
|||||||
.join('\n');
|
.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const importCode = 'import';
|
||||||
const commonCode = computed(() => ({
|
const commonCode = computed(() => ({
|
||||||
import: `import '@n8n/chat/style.css';
|
import: `${importCode} '@n8n/chat/style.css';
|
||||||
import { createChat } from '@n8n/chat';`,
|
${importCode} { createChat } from '@n8n/chat';`,
|
||||||
createChat: `createChat({
|
createChat: `createChat({
|
||||||
webhookUrl: '${webhookUrl.value}'
|
webhookUrl: '${webhookUrl.value}'
|
||||||
});`,
|
});`,
|
||||||
@ -69,7 +70,7 @@ import { createChat } from '@n8n/chat';`,
|
|||||||
const cdnCode = computed(
|
const cdnCode = computed(
|
||||||
() => `<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/style.css" rel="stylesheet" />
|
() => `<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/style.css" rel="stylesheet" />
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/chat.bundle.es.js';
|
${importCode} { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/chat.bundle.es.js';
|
||||||
|
|
||||||
${commonCode.value.createChat}
|
${commonCode.value.createChat}
|
||||||
</${'script'}>`,
|
</${'script'}>`,
|
||||||
@ -77,7 +78,7 @@ ${commonCode.value.createChat}
|
|||||||
|
|
||||||
const vueCode = computed(
|
const vueCode = computed(
|
||||||
() => `<script lang="ts" setup>
|
() => `<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
${importCode} { onMounted } from 'vue';
|
||||||
${commonCode.value.import}
|
${commonCode.value.import}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -87,7 +88,7 @@ ${indentLines(commonCode.value.createChat)}
|
|||||||
);
|
);
|
||||||
|
|
||||||
const reactCode = computed(
|
const reactCode = computed(
|
||||||
() => `import { useEffect } from 'react';
|
() => `${importCode} { useEffect } from 'react';
|
||||||
${commonCode.value.import}
|
${commonCode.value.import}
|
||||||
|
|
||||||
export const App = () => {
|
export const App = () => {
|
||||||
|
@ -13,9 +13,13 @@
|
|||||||
"lint": {},
|
"lint": {},
|
||||||
"lintfix": {},
|
"lintfix": {},
|
||||||
"test": {},
|
"test": {},
|
||||||
"watch": {},
|
"watch": {
|
||||||
|
"cache": false,
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"cache": false
|
"cache": false,
|
||||||
|
"persistent": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user