Skip to content

Commit b63d771

Browse files
feat(agentflow): update package publish config and README instruction (#5753)
* feat(agentflow): update agentflow sdk contract and fix lint configs * feat(agentflow): update package publish config and README instruction * address gemini review feedback
1 parent 3b9d912 commit b63d771

4 files changed

Lines changed: 76 additions & 11 deletions

File tree

packages/agentflow/.npmignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
# Source files
1+
# Source & config
22
/src
3-
/tests
4-
/*.ts
5-
/*.tsx
3+
/examples
4+
*.ts
5+
!*.d.ts
66
tsconfig.json
77
vite.config.ts
8+
jest.config.js
9+
.eslintrc.js
810

9-
# Dev files
11+
# Dev artifacts
1012
.turbo
1113
node_modules
14+
.DS_Store
1215

1316
# Keep dist
1417
!dist

packages/agentflow/README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @flowise/agentflow
22

33
[![Version](https://img.shields.io/npm/v/@flowise/agentflow)](https://www.npmjs.com/package/@flowise/agentflow)
4-
[![License](https://img.shields.io/badge/license-SEE%20LICENSE-blue)](./LICENSE.md)
4+
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/FlowiseAI/Flowise/blob/main/LICENSE.md)
55

66
> Embeddable React component for building and visualizing AI agent workflows
77
@@ -149,6 +149,45 @@ cd examples && pnpm install && pnpm dev
149149

150150
Visit the [examples](./examples) directory for more usage patterns. See [TESTS.md](./TESTS.md) for the full test plan and coverage status.
151151

152+
## Publishing
153+
154+
### Version Update
155+
156+
Bump the version in `package.json` before publishing. Use `npm version` to update the version and create a git tag:
157+
158+
```bash
159+
# Prerelease (for testing)
160+
npm version prerelease --preid=dev # 0.0.0-dev.1 → 0.0.0-dev.2
161+
162+
# Patch / Minor / Major (for stable releases)
163+
npm version patch # 0.0.1
164+
npm version minor # 0.1.0
165+
npm version major # 1.0.0
166+
```
167+
168+
### Verify Before Publishing
169+
170+
```bash
171+
# Build and check the tarball contents
172+
pnpm build
173+
npm pack --dry-run
174+
175+
# Full publish dry-run (runs prepublishOnly + simulates upload)
176+
npm publish --dry-run
177+
```
178+
179+
### Publish
180+
181+
```bash
182+
# Prerelease — tagged so `npm install @flowise/agentflow` won't pick it up
183+
npm publish --tag dev
184+
185+
# Stable release — gets the `latest` tag
186+
npm publish
187+
```
188+
189+
> The `prepublishOnly` script automatically runs `clean` and `build` before every publish, so stale dist files are never uploaded.
190+
152191
## Documentation
153192

154193
- [ARCHITECTURE.md](./ARCHITECTURE.md) - Internal architecture and design patterns
@@ -161,7 +200,7 @@ This package follows a feature-based architecture with clear separation of conce
161200

162201
## License
163202

164-
See [LICENSE.md](./LICENSE.md) for details.
203+
Apache-2.0 — see the repository root [LICENSE.md](https://github.com/FlowiseAI/Flowise/blob/main/LICENSE.md) for details.
165204

166205
---
167206

packages/agentflow/package.json

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
{
22
"name": "@flowise/agentflow",
33
"version": "0.0.0-dev.1",
4-
"description": "Embeddable Agentflow component for React applications",
5-
"license": "SEE LICENSE IN LICENSE.md",
4+
"description": "Embeddable React component for building and visualizing AI agent workflows",
5+
"license": "Apache-2.0",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/FlowiseAI/Flowise.git",
9+
"directory": "packages/agentflow"
10+
},
11+
"homepage": "https://github.com/FlowiseAI/Flowise/tree/main/packages/agentflow#readme",
12+
"bugs": {
13+
"url": "https://github.com/FlowiseAI/Flowise/issues"
14+
},
15+
"keywords": [
16+
"flowise",
17+
"agentflow",
18+
"react",
19+
"llm",
20+
"ai",
21+
"agent",
22+
"workflow"
23+
],
24+
"publishConfig": {
25+
"access": "public",
26+
"registry": "https://registry.npmjs.org"
27+
},
628
"main": "./dist/index.umd.js",
729
"module": "./dist/index.js",
830
"types": "./dist/index.d.ts",
@@ -32,7 +54,8 @@
3254
"test": "jest",
3355
"test:watch": "jest --watch",
3456
"test:coverage": "jest --coverage",
35-
"nuke": "rimraf dist node_modules .turbo"
57+
"nuke": "rimraf dist node_modules .turbo",
58+
"prepublishOnly": "npm run clean && npm run build"
3659
},
3760
"peerDependencies": {
3861
"react": "^18.2.0",

packages/agentflow/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
dts({
1010
insertTypesEntry: true,
1111
include: ['src/**/*'],
12-
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
12+
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/__test_utils__/**'],
1313
}),
1414
],
1515
resolve: {

0 commit comments

Comments
 (0)