Skip to content

Commit 21ab3c3

Browse files
committed
Add changeset workflow
1 parent e275a32 commit 21ab3c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4138
-2701
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Release NPM Package (Alpha)
5+
6+
on:
7+
push:
8+
branches: ["dev"]
9+
10+
env:
11+
RELEASE_TAG: alpha
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js 20
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm i --workspace=npm-packages/shared-utils && npm i --workspace=npm-packages/react-api
27+
28+
- name: Build @pulse-editor/shared-utils
29+
run: npm run build --workspace=npm-packages/shared-utils
30+
31+
- name: Build @pulse-editor/react-api
32+
run: npm run build --workspace=npm-packages/react-api
33+
34+
- name: Install changesets
35+
run: npm i -D changesets
36+
37+
- name: Use Alpha Changesets Tag
38+
run: npx changeset pre enter ${{env.RELEASE_TAG}}
39+
40+
- name: Create Release Pull Request or Publish to npm
41+
id: changesets
42+
uses: changesets/action@v1
43+
with:
44+
version: npx changeset version
45+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
46+
publish: npx changeset publish
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

npm-packages/cli/source/cli.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {render} from 'ink';
44
import meow from 'meow';
55
import App from './app.js';
66
import {commandsManual} from './lib/manual.js';
7-
import { flags } from './lib/cli-flags.js';
7+
import {flags} from './lib/cli-flags.js';
88

99
const cli = meow(
1010
`\

npm-packages/cli/tsconfig.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"compilerOptions": {
44
"outDir": "dist",
55
"noUnusedLocals": false,
6-
"noUnusedParameters": false,
6+
"noUnusedParameters": false
77
},
8-
"include": [
9-
"source"
10-
]
11-
}
8+
"include": ["source"]
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @pulse-editor/react-api
2+
## 0.1.0-alpha.0
3+
4+
### Minor Changes
5+
6+
- Support Module Federation extension sharing
7+
8+
### Patch Changes
9+
10+
- Updated dependencies
11+
- @pulse-editor/shared-utils@0.1.0-alpha.0
12+
- Remove dependencies
13+
- @pulse-editor/types@0.1.0-alpha.0

npm-packages/react-api/package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"name": "@pulse-editor/react-api",
3-
"version": "0.0.1",
4-
"main": "src/main.ts",
3+
"version": "0.1.0",
4+
"main": "dist/main.js",
55
"type": "module",
6+
"files": [
7+
"dist"
8+
],
9+
"publishConfig": {
10+
"access": "public"
11+
},
612
"scripts": {
713
"build": "rollup -c",
814
"lint": "eslint ."
@@ -16,7 +22,6 @@
1622
"@rollup/plugin-terser": "^0.4.4",
1723
"@rollup/plugin-typescript": "^12.1.2",
1824
"@types/react": "^19.1.2",
19-
"autoprefixer": "^10.4.21",
2025
"eslint": "^9.25.0",
2126
"eslint-plugin-react": "^7.37.5",
2227
"globals": "^16.0.0",
@@ -30,9 +35,8 @@
3035
"typescript-eslint": "^8.30.1"
3136
},
3237
"peerDependencies": {
38+
"@pulse-editor/shared-utils": "0.1.0",
3339
"react": "^19.0.0",
34-
"react-dom": "^19.0.0",
35-
"@pulse-editor/types": "*",
36-
"@pulse-editor/shared-utils": "*"
40+
"react-dom": "^19.0.0"
3741
}
3842
}

npm-packages/react-api/rollup.config.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export default {
99
input: "src/main.ts",
1010
output: [
1111
{
12-
file: "dist/bundle.js",
12+
file: "dist/main.js",
1313
format: "cjs",
1414
},
1515
{
16-
file: "dist/bundle.es.js",
16+
file: "dist/main.es.js",
1717
format: "es",
1818
exports: "named",
1919
},
@@ -28,7 +28,10 @@ export default {
2828
exclude: ["node_modules/**"],
2929
}),
3030
typescript({
31-
exclude: ["node_modules/**", "src/stories/**"],
31+
declaration: true,
32+
declarationDir: "dist",
33+
rootDir: "src",
34+
exclude: ["node_modules/**"],
3235
}),
3336
terser(),
3437
],

npm-packages/react-api/src/hooks/use-agent-tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AgentTool, IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/types";
1+
import { AgentTool, IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/shared-utils";
22
import useIMC from "../lib/hooks/use-imc";
33

44
export default function useAgentTools(moduleName: string) {

npm-packages/react-api/src/hooks/use-agents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Agent, IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/types";
1+
import { Agent, IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/shared-utils";
22
import useIMC from "../lib/hooks/use-imc";
33

44
export default function useAgents(moduleName: string) {

npm-packages/react-api/src/hooks/use-fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/types";
1+
import { IMCMessage, IMCMessageTypeEnum } from "@pulse-editor/shared-utils";
22

33
import useIMC from "../lib/hooks/use-imc";
44

0 commit comments

Comments
 (0)