@pikku/queue-nats 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @pikku/queue-nats
2
2
 
3
+ ## 0.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 4c7a1b5: Run the monorepo's own scripts through bun instead of yarn. What moves is the
8
+ package manager each package's `prepublishOnly` and build scripts invoke, plus
9
+ the two manifest fixes bun needs to resolve the tree: `uWebSockets.js` is
10
+ declared with an explicit `github:` specifier, and `@pikku/uws-handler` marks
11
+ its `uWebSockets.js` peer optional so a bun install of a consumer that brings
12
+ its own uWS app does not try to fetch it from the registry.
13
+
14
+ Three published behaviours change, all of them cases where an isolated
15
+ `node_modules` or bun as the runtime had been papered over by yarn's hoisting:
16
+
17
+ - `@pikku/migrator-sql` turns foreign keys on when it opens a sqlite database
18
+ through bun. `node:sqlite` enforces them by default and `bun:sqlite` does not,
19
+ which silently turned every `ON DELETE CASCADE` into a no-op under
20
+ `bunx --bun pikku`.
21
+ - `@pikku/cli` resolves a deploy provider against the project being deployed
22
+ rather than against wherever the CLI itself is installed, which is what its
23
+ own "is not installed" error asks the user to arrange.
24
+ - `@pikku/cli` treats a specifier a runtime hands straight back — bun does this
25
+ for the modules it implements itself — as not resolved from the project, so
26
+ it falls back rather than loading the runtime's own copy.
27
+
28
+ - Updated dependencies [4c7a1b5]
29
+ - @pikku/core@0.12.108
30
+
3
31
  ## 0.12.1
4
32
 
5
33
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@pikku/queue-nats",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/pikkujs/pikku.git",
7
+ "directory": "packages/services/queue-nats"
8
+ },
4
9
  "description": "NATS JetStream queue, worker and scheduler services for Pikku",
5
10
  "author": "yasser.fadl@gmail.com",
6
11
  "license": "MIT",
@@ -14,19 +19,16 @@
14
19
  "ncu": "npx npm-check-updates",
15
20
  "build": "tsc -b",
16
21
  "release": "npm run build && npm test",
17
- "prepublishOnly": "yarn build"
22
+ "prepublishOnly": "bun run build"
18
23
  },
19
24
  "peerDependencies": {
20
- "@pikku/core": "^0.12.105"
25
+ "@pikku/core": "^0.12.108"
21
26
  },
22
27
  "dependencies": {
23
28
  "@nats-io/jetstream": "^3.4.0",
24
29
  "@nats-io/nats-core": "^3.4.0",
25
30
  "@nats-io/transport-node": "^3.4.0"
26
31
  },
27
- "devDependencies": {
28
- "typescript": "^6.0.3"
29
- },
30
32
  "exports": {
31
33
  ".": "./dist/index.js"
32
34
  }
package/run-tests.sh CHANGED
@@ -1,8 +1,5 @@
1
1
  #!/bin/bash
2
2
 
3
- script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
- cd "$script_dir"
5
-
6
3
  # Enable nullglob to handle cases where no files match the pattern
7
4
  shopt -s nullglob
8
5
 
@@ -37,20 +34,35 @@ files=($(find src -type f -name "*.test.ts"))
37
34
  # Check if any files matched the pattern
38
35
  if [ ${#files[@]} -eq 0 ]; then
39
36
  echo "No test files found matching pattern: $pattern"
37
+ if [ "${STRICT_TEST_DISCOVERY}" = "1" ]; then
38
+ exit 1
39
+ fi
40
40
  exit 0
41
41
  fi
42
42
 
43
- # Construct the node command
44
- node_cmd=(node --import tsx --test)
43
+ # Construct the bun command
44
+ #
45
+ # --parallel gives every test file its own worker process, which is what node's
46
+ # `--test` did. Several suites keep module-level caches (a TypeScript program, a
47
+ # temp fixture directory) that a shared process would leak between files.
48
+ #
49
+ # --timeout because bun caps a test at 5s by default where node had no cap, and
50
+ # the suites that build real TypeScript programs run well past that.
51
+ bun_cmd=(bun test --parallel --timeout 120000)
45
52
 
46
53
  # Append options based on flags
47
54
  if [ "$watch_mode" = true ]; then
48
- node_cmd+=(--watch)
55
+ # --watch reruns in one process; parallel workers have nothing to watch.
56
+ bun_cmd=(bun test --watch --timeout 120000)
49
57
  fi
50
58
 
51
59
  if [ "$coverage_mode" = true ]; then
52
- node_cmd+=(--test-coverage-include="src/**/*.{ts,js}" --test-coverage-exclude="**/dist/**" --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info)
60
+ # --coverage-dir=. keeps lcov.info at the package root: CI merges every
61
+ # package's report by prefixing its SF paths with the file's own directory,
62
+ # so a nested coverage/ directory would re-root them one level too deep.
63
+ bun_cmd+=(--coverage --coverage-reporter=lcov --coverage-reporter=text --coverage-dir=.)
64
+ export PIKKU_TEST_COVERAGE=1
53
65
  fi
54
66
 
55
- # Execute the node command with the expanded list of files
56
- "${node_cmd[@]}" "${files[@]}"
67
+ # Execute the bun command with the expanded list of files
68
+ "${bun_cmd[@]}" "${files[@]}"