Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Install dependencies
run: npm install
Expand All @@ -110,20 +110,20 @@ jobs:
timeout-minutes: 10
needs: [detect-changes]
if: |
github.event_name == 'push' ||
always() && (github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
needs.detect-changes.outputs.mjs-changed == 'true' ||
needs.detect-changes.outputs.js-changed == 'true' ||
needs.detect-changes.outputs.docs-changed == 'true' ||
needs.detect-changes.outputs.package-changed == 'true' ||
needs.detect-changes.outputs.workflow-changed == 'true'
needs.detect-changes.outputs.workflow-changed == 'true')
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Install dependencies
run: npm install
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:

- name: Run tests (Bun)
if: matrix.runtime == 'bun'
run: bun test
run: bun test ./tests

- name: Setup Deno
if: matrix.runtime == 'deno'
Expand All @@ -203,7 +203,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Install dependencies
run: npm install
Expand All @@ -219,11 +219,26 @@ jobs:
path: js/coverage/
retention-days: 14

# Test the tarball in an isolated consumer, including all integration exports.
package:
name: Verify npm Package
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.x'
- name: Verify release tooling startup on Node 24
run: node scripts/version-and-commit.mjs --help
- run: node --test scripts/publish-to-npm.test.mjs
- run: npm run test:package

# Release - only runs on main after tests pass (for push events)
release:
name: Release
needs: [lint, test]
if: always() && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.lint.result == 'success' && needs.test.result == 'success'
needs: [lint, test, package]
if: always() && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.lint.result == 'success' && needs.test.result == 'success' && needs.package.result == 'success'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -237,7 +252,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down Expand Up @@ -279,7 +294,8 @@ jobs:
# Manual Instant Release
instant-release:
name: Instant Release
if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_mode == 'instant'
if: always() && github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch' && github.event.inputs.release_mode == 'instant' && needs.lint.result == 'success' && needs.test.result == 'success' && needs.package.result == 'success'
needs: [lint, test, package]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -293,7 +309,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down Expand Up @@ -339,7 +355,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Install dependencies
run: npm install
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Detect changes
id: changes
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Cache cargo registry
uses: actions/cache@v4
Expand All @@ -153,6 +153,9 @@ jobs:
- name: Check file size limit
run: node scripts/check-file-size.mjs

- name: Verify release tooling startup on Node 24
run: node scripts/version-and-commit.mjs --help

- name: Test release scripts
run: node --test scripts/crates-io.test.mjs

Expand Down Expand Up @@ -283,7 +286,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Configure git
run: |
Expand Down Expand Up @@ -379,7 +382,7 @@ jobs:
manual-release:
name: Manual Release
needs: [lint, test, build]
if: always() && github.event_name == 'workflow_dispatch' && needs.build.result == 'success'
if: always() && github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch' && needs.build.result == 'success'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -398,7 +401,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'

- name: Configure git
run: |
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ Changes to files in `js/` trigger the JS workflow, and changes to files in `rust
## License

[Unlicense](LICENSE) - Public Domain

Publishing: [npm and crates.io release setup](docs/guides/releasing.md).
38 changes: 38 additions & 0 deletions WORK_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Issue 55 work plan

- [x] Read issue 55, referenced issue 53, all comments, and PR 56 feedback (none).
- [x] Inspect recent merged PRs and existing release scripts/workflows.
- [x] Consolidate npm metadata, exports, dependencies, examples, docs, release tooling.
- [x] Verify installed tarball: core, server/client, all four integrations and types.
- [x] Repair npm and Rust OIDC release paths; add release triggers and startup verification.
- [ ] Verify live registry acceptance: canonical npm name and Rust crate published by workflow; split npm names absent.
- [x] Review diff, commit, push only issue-55-ec61bae8f6e4, update PR 56.
Final-SHA CI and ready status are tracked on PR #56.

Registry publication is a separate acceptance criterion from CI. Keep it unfinished
if registry ownership/bootstrap credentials or trusted-publisher registration are unavailable.

Initial evidence: all six npm names returned E404. Main Rust release run
39921677800 failed before authentication: `TEXT_ENCODINGS.union is not a function`
from command-stream's execa dependency under Node 20 (log lines 8634–8652).
Both workflow release runtimes are being updated to Node 24.

Verification: installed tarball test passed locally and on CI; pre-change main
fails the same test (`experiments/issue-55-package-regression.sh`). npm publisher
unit tests and all 11 Rust release helper tests pass. JS lint, formatting,
duplication checks, and changeset status pass. CI verifies release script startup
on Node 24 to regress the main-branch failure without creating commits or tags.

Live publication remains blocked: npm whoami reports ENEEDAUTH; no Cargo
credentials file or repository Actions secrets exist. All npm names still return
E404; cargo search returns no matching crate (direct crates.io API access is
HTTP 403 in this environment). A registry owner must bootstrap and register the
trusted publishers; this is documented in the PR and release guide. The PR is
kept unmerged and live publication is not claimed as complete.

CI investigation: the initial Bun/Windows job also discovered Node-only release
script tests. Its package test failed because shell invocation split inline
JavaScript (`Unexpected end of file`, job log lines 183–225). The package test
now uses a real module file and invokes executables without a shell. Bun CI is
scoped to its existing runtime suite in tests/; packaging remains explicitly
covered by the Node 24 Verify npm Package job.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Links Queue provides implementations in multiple languages:

| Language | Package | Documentation |
| --------------------- | -------------------------------------------------------------- | ----------------------------------- |
| JavaScript/TypeScript | [links-queue-js](https://www.npmjs.com/package/links-queue-js) | [js/README.md](../js/README.md) |
| JavaScript/TypeScript | [links-queue](https://www.npmjs.com/package/links-queue) | [js/README.md](../js/README.md) |
| Rust | [links-queue](https://crates.io/crates/links-queue) | [rust/README.md](../rust/README.md) |

## Feature Status
Expand Down
40 changes: 20 additions & 20 deletions docs/api/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Complete API documentation for the Links Queue JavaScript/TypeScript implementat
## Installation

```bash
npm install links-queue-js
npm install links-queue
```

## Quick Reference
Expand Down Expand Up @@ -73,7 +73,7 @@ interface LinkPattern {
Special symbol for wildcard matching in patterns.

```typescript
import { Any } from "links-queue-js";
import { Any } from "links-queue";

// Match any source, specific target
const pattern = { source: Any, target: 30 };
Expand All @@ -99,7 +99,7 @@ function createLink(
**Example:**

```javascript
import { createLink } from "links-queue-js";
import { createLink } from "links-queue";

const link = createLink(1, "task", "process-data");
// { id: 1, source: 'task', target: 'process-data' }
Expand Down Expand Up @@ -151,7 +151,7 @@ function matchesPattern(link: Link, pattern: LinkPattern): boolean;
**Example:**

```javascript
import { createLink, matchesPattern, Any } from "links-queue-js";
import { createLink, matchesPattern, Any } from "links-queue";

const link = createLink(1, 10, 20);

Expand Down Expand Up @@ -221,7 +221,7 @@ const store = new MemoryLinkStore();
**Example:**

```javascript
import { MemoryLinkStore, Any } from "links-queue-js";
import { MemoryLinkStore, Any } from "links-queue";

const store = new MemoryLinkStore();

Expand Down Expand Up @@ -323,7 +323,7 @@ const queue = new LinksQueue(config);
**Example:**

```javascript
import { LinksQueue, MemoryLinkStore, createLink } from "links-queue-js";
import { LinksQueue, MemoryLinkStore, createLink } from "links-queue";

const store = new MemoryLinkStore();
const queue = new LinksQueue({
Expand Down Expand Up @@ -376,7 +376,7 @@ const queue = new MemoryQueue(name, options?);
**Example:**

```javascript
import { MemoryQueue, createLink } from "links-queue-js";
import { MemoryQueue, createLink } from "links-queue";

const queue = new MemoryQueue("tasks");

Expand Down Expand Up @@ -426,7 +426,7 @@ class MemoryQueueManager implements QueueManager
**Example:**

```javascript
import { MemoryQueueManager, MemoryLinkStore } from "links-queue-js";
import { MemoryQueueManager, MemoryLinkStore } from "links-queue";

const store = new MemoryLinkStore();
const manager = new MemoryQueueManager({ store });
Expand Down Expand Up @@ -457,7 +457,7 @@ await manager.deleteQueue("events");
TCP server for remote queue access.

```typescript
import { LinksQueueServer } from "links-queue-js/server";
import { LinksQueueServer } from "links-queue/server";
```

**Constructor Options:**
Expand All @@ -480,7 +480,7 @@ import { LinksQueueServer } from "links-queue-js/server";
**Example:**

```javascript
import { LinksQueueServer } from "links-queue-js/server";
import { LinksQueueServer } from "links-queue/server";

const server = new LinksQueueServer({
port: 5000,
Expand All @@ -503,7 +503,7 @@ process.on("SIGTERM", async () => {
TCP client for connecting to Links Queue servers.

```typescript
import { LinksQueueClient } from "links-queue-js/client";
import { LinksQueueClient } from "links-queue/client";
```

**Constructor:**
Expand Down Expand Up @@ -541,8 +541,8 @@ const client = new LinksQueueClient(address, options?);
**Example:**

```javascript
import { LinksQueueClient } from "links-queue-js/client";
import { createLink } from "links-queue-js";
import { LinksQueueClient } from "links-queue/client";
import { createLink } from "links-queue";

const client = new LinksQueueClient("localhost:5000");
await client.connect();
Expand Down Expand Up @@ -591,7 +591,7 @@ type QueueErrorCode =
**Example:**

```javascript
import { QueueError } from "links-queue-js";
import { QueueError } from "links-queue";

try {
await queue.enqueue(link);
Expand Down Expand Up @@ -620,7 +620,7 @@ import {
LinksNotation,
NotationParser,
NotationStreamParser,
} from "links-queue-js";
} from "links-queue";
```

### LinksNotation
Expand All @@ -635,7 +635,7 @@ class LinksNotation {
**Example:**

```javascript
import { LinksNotation } from "links-queue-js";
import { LinksNotation } from "links-queue";

// Parse Links Notation
const links = LinksNotation.parse("((1 2) (3 4))");
Expand Down Expand Up @@ -664,14 +664,14 @@ import {
RequestType,
ResponseStatus,
ErrorCode,
} from "links-queue-js";
} from "links-queue";
```

---

## Exports Summary

### Main Module (`links-queue-js`)
### Main Module (`links-queue`)

```javascript
// Core
Expand All @@ -698,13 +698,13 @@ export { LinksNotation, NotationParser, NotationStreamParser };
export { Message, MessageBuilder, RequestType, ResponseStatus, ErrorCode };
```

### Server Module (`links-queue-js/server`)
### Server Module (`links-queue/server`)

```javascript
export { LinksQueueServer, ServerConnection, RequestRouter };
```

### Client Module (`links-queue-js/client`)
### Client Module (`links-queue/client`)

```javascript
export { LinksQueueClient, ClientConnection };
Expand Down
Loading
Loading