Skip to content

Commit f52a54a

Browse files
authored
cleanup (#835)
Recovering from some package and script refactors. PR fixes a variety of dev config errors that knocked much of the e2e testing out of whack. Most previously existing tests should now be running and reporting correctly. - **bump: version v0.1.8-4** - **bump: version 0.1.8-4** - **use yarn npm publish...** - **bump: version 0.1.8-5** - **distinguish ahpla and stable npm releases** - **check against vvX.Y.Z tag** - **bump: version 0.1.8-6** - **fix: update e2e workflow script call** - **bump: version 0.1.8-7** - **update: use build:examples for local-dev build** - **rm early return** - **udpate build script** - **build library packages for e2e test** - **set node_env var for devenv** - **set a wait timeout**
2 parents 3a70bb6 + 69c8ab9 commit f52a54a

File tree

19 files changed

+71
-45
lines changed

19 files changed

+71
-45
lines changed

.github/workflows/ci-mcp-sanity.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: 20
24+
node-version: 22
2525
cache: 'yarn'
2626

2727
- name: Install Yarn
@@ -36,17 +36,23 @@ jobs:
3636
- name: run test database
3737
run: |
3838
yarn couchdb:start
39+
npx wait-on --timeout 5m http://localhost:5984
3940
40-
- name: Build mcp package
41-
run: yarn workspace @vue-skuilder/mcp build
41+
- name: Verify databases
42+
run: curl http://admin:password@localhost:5984/_all_dbs
43+
44+
- name: Build mcp package and examples
45+
run: |
46+
yarn workspace @vue-skuilder/mcp build
47+
yarn workspace @vue-skuilder/mcp build:examples
4248
4349
- name: list resources
4450
run: |
4551
yarn workspace @vue-skuilder/mcp test:resources
4652
4753
- name: list tools
4854
run: |
49-
yarn workspace @vue-skuilder/mcp test:resources
55+
yarn workspace @vue-skuilder/mcp test:tools
5056
5157
- name: list prompts
5258
run: |

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ jobs:
3939
- name: Install Cypress
4040
run: yarn workspace @vue-skuilder/platform-ui cypress install
4141
42+
- name: Build prereqs
43+
run: yarn build:lib
44+
4245
- name: Setup and wait for services
4346
run: |
4447
# Start the dev environment in background
45-
yarn dev &
48+
yarn dev:platform &
4649
# Wait for the webserver to be ready
47-
npx wait-on http://localhost:5173
50+
npx wait-on --timeout 5m http://localhost:5173
4851
# Wait for the database to be ready
49-
npx wait-on http://localhost:5984
52+
npx wait-on --timeout 5m http://localhost:5984
5053
# Wait for the backend to be ready
51-
npx wait-on http://localhost:3000
54+
npx wait-on --timeout 5m http://localhost:3000
5255
5356
- name: Run E2E tests
5457
run: |

.github/workflows/publish-npm.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ jobs:
3535
VERSION=${GITHUB_REF_NAME#v}
3636
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3737
echo "📌 Expected version: $VERSION"
38+
39+
# Determine npm tag based on version format
40+
if [[ "$VERSION" =~ -[0-9]+$ ]]; then
41+
NPM_TAG="alpha"
42+
echo "🚨 Decorated version detected, using --tag alpha"
43+
else
44+
NPM_TAG="latest"
45+
echo "✅ Stable version, using --tag latest"
46+
fi
47+
echo "NPM_TAG=$NPM_TAG" >> $GITHUB_OUTPUT
3848
3949
- name: Verify package versions match tag
4050
run: |
@@ -119,48 +129,47 @@ jobs:
119129
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
120130
run: |
121131
set -e
132+
NPM_TAG="${{ steps.extract_version.outputs.NPM_TAG }}"
122133
123134
echo "Publishing @vue-skuilder/common..."
124-
cd packages/common && yarn npm publish --access public && cd ../..
135+
cd packages/common && yarn npm publish --access public --tag $NPM_TAG && cd ../..
125136
126137
echo "Publishing @vue-skuilder/db..."
127-
cd packages/db && yarn npm publish --access public && cd ../..
138+
cd packages/db && yarn npm publish --access public --tag $NPM_TAG && cd ../..
128139
129140
echo "Publishing @vue-skuilder/common-ui..."
130-
cd packages/common-ui && yarn npm publish --access public && cd ../..
141+
cd packages/common-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
131142
132143
echo "Publishing @vue-skuilder/edit-ui..."
133-
cd packages/edit-ui && yarn npm publish --access public && cd ../..
144+
cd packages/edit-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
134145
135146
echo "Publishing @vue-skuilder/courseware..."
136-
cd packages/courseware && yarn npm publish --access public && cd ../..
147+
cd packages/courseware && yarn npm publish --access public --tag $NPM_TAG && cd ../..
137148
138149
echo "Publishing @vue-skuilder/client..."
139-
cd packages/client && yarn npm publish --access public && cd ../..
150+
cd packages/client && yarn npm publish --access public --tag $NPM_TAG && cd ../..
140151
141152
echo "Publishing @vue-skuilder/platform-ui..."
142-
cd packages/platform-ui && yarn npm publish --access public && cd ../..
153+
cd packages/platform-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
143154
144155
echo "Publishing @vue-skuilder/standalone-ui..."
145-
cd packages/standalone-ui && yarn npm publish --access public && cd ../..
156+
cd packages/standalone-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
146157
147158
echo "Publishing @vue-skuilder/mcp..."
148-
cd packages/mcp && yarn npm publish --access public && cd ../..
159+
cd packages/mcp && yarn npm publish --access public --tag $NPM_TAG && cd ../..
149160
150161
# echo "Publishing @vue-skuilder/tuilder..."
151-
# cd packages/tuilder && yarn npm publish --access public && cd ../..
162+
# cd packages/tuilder && yarn npm publish --access public --tag $NPM_TAG && cd ../..
152163
153164
echo "Publishing @vue-skuilder/express..."
154-
cd packages/express && yarn npm publish --access public && cd ../..
165+
cd packages/express && yarn npm publish --access public --tag $NPM_TAG && cd ../..
155166
156167
echo "Publishing @vue-skuilder/cli (scoped)..."
157-
cd packages/cli && yarn npm publish --access public && cd ../..
168+
cd packages/cli && yarn npm publish --access public --tag $NPM_TAG && cd ../..
158169
159170
# Dual-publish CLI as unscoped 'skuilder' package
160171
echo "Publishing CLI as 'skuilder'..."
161-
TEMP_DIR=$(mktemp -d)
162-
cp -r packages/cli/* "$TEMP_DIR/"
163-
cd "$TEMP_DIR"
172+
cd packages/cli
164173
165174
# Modify package.json for unscoped publish
166175
node -e "
@@ -172,8 +181,9 @@ jobs:
172181
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
173182
"
174183
175-
npm publish --access public
176-
cd - && rm -rf "$TEMP_DIR"
184+
# Use yarn npm publish to maintain workspace dependency resolution
185+
yarn npm publish --access public --tag $NPM_TAG
186+
cd ../..
177187
178188
echo "All packages published successfully!"
179189

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "vue-skuilder",
33
"scripts": {
44
"setup": "yarn && git submodule update --init --recursive && yarn build:lib",
5-
"dev": "yarn workspace @vue-skuilder/common build && yarn workspace @vue-skuilder/db build && yarn workspace @vue-skuilder/common-ui build && yarn workspace @vue-skuilder/courseware build && yarn workspace @vue-skuilder/edit-ui build && node scripts/dev-couchdb.js start && concurrently \"yarn dev:platform-ui\" \"yarn dev:express\"",
65
"dev:watch": "node scripts/dev-watch.js",
76
"dev:platform": "yarn couchdb:start && yarn workspace @vue-skuilder/express dev & yarn workspace @vue-skuilder/platform-ui dev",
87
"couchdb:start": "node scripts/dev-couchdb.js start",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"type": "module",
88
"description": "CLI scaffolding tool for vue-skuilder projects",
99
"bin": {

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"license": "MIT",
88
"main": "dist/index.js",
99
"module": "dist/index.esm.js",

packages/common-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"main": "./dist/common-ui.umd.js",
88
"module": "./dist/common-ui.es.js",
99
"types": "./dist/index.d.ts",

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"type": "module",
88
"main": "dist/index.js",
99
"module": "dist/index.mjs",

packages/courseware/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"type": "module",
88
"main": "./dist/index.cjs.js",
99
"module": "./dist/index.mjs",

packages/db/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.8-3",
6+
"version": "0.1.8-7",
77
"description": "Database layer for vue-skuilder",
88
"main": "dist/index.js",
99
"module": "dist/index.mjs",

0 commit comments

Comments
 (0)