diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0dd94da77..00a03324e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -28,9 +28,9 @@ jobs: node-version: "lts/*" registry-url: "https://registry.npmjs.org" - run: npm ci - - run: npm run build - - run: npm publish + - run: npm run build --workspaces --if-present + - run: npm publish --workspaces if: "!github.event.release.prerelease" # npm requires explicitly specifying a "tag" like `next` if the semantic version is a prerelease like `2.0.0-alpha1` - - run: npm publish --tag next + - run: npm publish --workspaces --tag next if: github.event.release.prerelease diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f6b5922cf..46e350387 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,12 +29,12 @@ jobs: - name: Install run: npm ci - name: Generate docs - run: npm run doc + run: npm run doc --workspace packages/roslib - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v4 with: - path: docs/ + path: packages/roslib/docs/ deploy: needs: build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4dcd7ed9..6f969d892 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,10 +38,10 @@ jobs: run: npm ci - name: Build JavaScript library - run: npm run build + run: npm run build --workspaces --if-present - name: Run tests - run: npm test + run: npm test --workspaces --if-present docs: uses: ./.github/workflows/docs.yml diff --git a/README.md b/README.md new file mode 100644 index 000000000..75a90a7ad --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Robot Web Tools JavaScript Client Libraries + +This is the monorepo for RobotWebTools JavaScript client libraries. +See the READMEs of individual packages for more information. + +## Packages + +- [roslibjs](./packages/roslib/README.md) diff --git a/packages/roslib/package-lock.json b/package-lock.json similarity index 99% rename from packages/roslib/package-lock.json rename to package-lock.json index 4c1635104..e27f8a555 100644 --- a/packages/roslib/package-lock.json +++ b/package-lock.json @@ -1,53 +1,13 @@ { - "name": "roslib", - "version": "2.0.0-alpha7", + "name": "@robot-web-tools/workspace", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "roslib", - "version": "2.0.0-alpha7", - "license": "BSD-2-Clause", - "dependencies": { - "@xmldom/xmldom": "^0.9.8", - "bson": "^7.0.0", - "cbor2": "^2.0.1", - "eventemitter3": "^5.0.1", - "fast-png": "^7.0.1", - "uuid": "^13.0.0", - "ws": "^8.0.0" - }, - "devDependencies": { - "@eslint/js": "^9.32.0", - "@testing-library/react": "^16.0.0", - "@types/dockerode": "^3.3.45", - "@types/node": "^24.0.1", - "@types/ws": "^8.5.10", - "changelog-maker": "^4.4.5", - "dockerode": "^4.0.9", - "eslint": "^9.32.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsdoc": "^61.1.12", - "eslint-plugin-prettier": "^5.5.4", - "globals": "^16.0.0", - "http-server": "^14.1.1", - "jiti": "^2.6.1", - "jsdom": "^27.0.0", - "jspm": "^4.2.0", - "typedoc": "^0.28.14", - "typescript": "^5.9.2", - "typescript-eslint": "^8.39.0", - "vite": "^7.0.0", - "vite-plugin-checker": "^0.11.0", - "vite-plugin-dts": "^4.0.2", - "vite-plugin-externalize-deps": "^0.10.0", - "vitest": "^4.0.3", - "vitest-fail-on-console": "^0.10.1" - }, - "engines": { - "node": ">=20" - } + "name": "@robot-web-tools/workspace", + "workspaces": [ + "packages/*" + ] }, "node_modules/@acemir/cssom": { "version": "0.9.23", @@ -11139,6 +11099,10 @@ "fsevents": "~2.3.2" } }, + "node_modules/roslib": { + "resolved": "packages/roslib", + "link": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -13447,6 +13411,50 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "packages/roslib": { + "version": "2.0.0", + "license": "BSD-2-Clause", + "dependencies": { + "@xmldom/xmldom": "^0.9.8", + "bson": "^7.0.0", + "cbor2": "^2.0.1", + "eventemitter3": "^5.0.1", + "fast-png": "^7.0.1", + "uuid": "^13.0.0", + "ws": "^8.0.0" + }, + "devDependencies": { + "@eslint/js": "^9.32.0", + "@testing-library/react": "^16.0.0", + "@types/dockerode": "^3.3.45", + "@types/node": "^24.0.1", + "@types/ws": "^8.5.10", + "changelog-maker": "^4.4.5", + "dockerode": "^4.0.9", + "eslint": "^9.32.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-jsdoc": "^61.1.12", + "eslint-plugin-prettier": "^5.5.4", + "globals": "^16.0.0", + "http-server": "^14.1.1", + "jiti": "^2.6.1", + "jsdom": "^27.0.0", + "jspm": "^4.2.0", + "typedoc": "^0.28.14", + "typescript": "^5.9.2", + "typescript-eslint": "^8.39.0", + "vite": "^7.0.0", + "vite-plugin-checker": "^0.11.0", + "vite-plugin-dts": "^4.0.2", + "vite-plugin-externalize-deps": "^0.10.0", + "vitest": "^4.0.3", + "vitest-fail-on-console": "^0.10.1" + }, + "engines": { + "node": ">=20" + } } } } diff --git a/package.json b/package.json new file mode 100644 index 000000000..f5904a4bd --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "name": "@robot-web-tools/workspace", + "workspaces": [ + "packages/*" + ] +}