@balena/pinejs 25.0.1 → 25.0.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.
@@ -1,3 +1,15 @@
1
+ - commits:
2
+ - subject: Switch to using nodejs type stripping for build/test files
3
+ hash: 8427acb840043bac2cf0c5a0c6ba523d0473e659
4
+ body: ""
5
+ footer:
6
+ Change-type: patch
7
+ change-type: patch
8
+ author: Pagan Gazzard
9
+ nested: []
10
+ version: 25.0.2
11
+ title: ""
12
+ date: 2026-10-28T01:27:17.570Z
1
13
  - commits:
2
14
  - subject: Convert tests from `request` to `fetch`
3
15
  hash: f761fd5a5cf412605596f2c5bf5003be09c656f8
@@ -10,7 +22,7 @@
10
22
  nested: []
11
23
  version: 25.0.1
12
24
  title: ""
13
- date: 2026-10-28T01:14:51.757Z
25
+ date: 2026-10-28T01:26:15.704Z
14
26
  - commits:
15
27
  - subject: Combine the api key actor id and permissions caches
16
28
  hash: 4509accfc35e1c8289d3115486dc45d142366045
@@ -9095,6 +9107,7 @@
9095
9107
 
9096
9108
 
9097
9109
 
9110
+
9098
9111
 
9099
9112
 
9100
9113
  As balena-lint
@@ -9308,6 +9321,7 @@
9308
9321
 
9309
9322
 
9310
9323
 
9324
+
9311
9325
 
9312
9326
 
9313
9327
  As engine and npm is
@@ -9536,6 +9550,7 @@
9536
9550
 
9537
9551
 
9538
9552
 
9553
+
9539
9554
 
9540
9555
 
9541
9556
  Ensure that the
@@ -9827,6 +9842,7 @@
9827
9842
 
9828
9843
 
9829
9844
 
9845
+
9830
9846
 
9831
9847
 
9832
9848
  This also deprecates
@@ -10046,6 +10062,7 @@
10046
10062
 
10047
10063
 
10048
10064
 
10065
+
10049
10066
 
10050
10067
 
10051
10068
  It can in fact be a
@@ -10266,6 +10283,7 @@
10266
10283
 
10267
10284
 
10268
10285
 
10286
+
10269
10287
 
10270
10288
 
10271
10289
  We know what type
@@ -10491,6 +10509,7 @@
10491
10509
 
10492
10510
 
10493
10511
 
10512
+
10494
10513
 
10495
10514
 
10496
10515
  Update
@@ -10827,6 +10846,7 @@
10827
10846
 
10828
10847
 
10829
10848
 
10849
+
10830
10850
 
10831
10851
 
10832
10852
  This also deprecates
@@ -14136,6 +14156,7 @@
14136
14156
 
14137
14157
 
14138
14158
 
14159
+
14139
14160
 
14140
14161
 
14141
14162
  As balena-lint
@@ -14377,6 +14398,7 @@
14377
14398
 
14378
14399
 
14379
14400
 
14401
+
14380
14402
 
14381
14403
 
14382
14404
  As engine and npm is
@@ -14633,6 +14655,7 @@
14633
14655
 
14634
14656
 
14635
14657
 
14658
+
14636
14659
 
14637
14660
 
14638
14661
  Ensure that the
@@ -14952,6 +14975,7 @@
14952
14975
 
14953
14976
 
14954
14977
 
14978
+
14955
14979
 
14956
14980
 
14957
14981
  This also deprecates
@@ -15199,6 +15223,7 @@
15199
15223
 
15200
15224
 
15201
15225
 
15226
+
15202
15227
 
15203
15228
 
15204
15229
  It can in fact be a
@@ -15447,6 +15472,7 @@
15447
15472
 
15448
15473
 
15449
15474
 
15475
+
15450
15476
 
15451
15477
 
15452
15478
  We know what type
@@ -15700,6 +15726,7 @@
15700
15726
 
15701
15727
 
15702
15728
 
15729
+
15703
15730
 
15704
15731
 
15705
15732
  Update
@@ -16064,6 +16091,7 @@
16064
16091
 
16065
16092
 
16066
16093
 
16094
+
16067
16095
 
16068
16096
 
16069
16097
  This also deprecates
package/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
4
4
  automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
5
5
  This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ # v25.0.2
8
+ ## (2026-10-28)
9
+
10
+ * Switch to using nodejs type stripping for build/test files [Pagan Gazzard]
11
+
7
12
  # v25.0.1
8
13
  ## (2026-10-28)
9
14
 
@@ -1,14 +1,12 @@
1
1
  import type * as Grunt from 'grunt';
2
2
  import type { WebpackPluginInstance } from 'webpack';
3
3
 
4
- import * as _ from 'lodash';
5
- import * as $TerserPlugin from 'terser-webpack-plugin';
6
- import type TerserPluginType from 'terser-webpack-plugin';
7
- // @ts-expect-error we need to cat the terser plugin type due to having to use `* as` for runtime to work but default import for the type
8
- const TerserPlugin = $TerserPlugin as typeof TerserPluginType;
9
- import browserConfig from './build/browser.cts';
10
- import moduleConfig from './build/module.cts';
11
- import serverConfig from './build/server.cts';
4
+ import _ from 'lodash';
5
+ import TerserPlugin from 'terser-webpack-plugin';
6
+ import loadGruntTasks from 'load-grunt-tasks';
7
+ import browserConfig from './build/browser.ts';
8
+ import moduleConfig from './build/module.ts';
9
+ import serverConfig from './build/server.ts';
12
10
 
13
11
  const serverConfigs = {
14
12
  browser: browserConfig,
@@ -37,7 +35,7 @@ for (const config of Object.values(serverConfigs)) {
37
35
  };
38
36
  }
39
37
 
40
- export = (grunt: typeof Grunt) => {
38
+ const gruntfile = (grunt: typeof Grunt) => {
41
39
  grunt.initConfig({
42
40
  clean: {
43
41
  default: {
@@ -140,8 +138,7 @@ export = (grunt: typeof Grunt) => {
140
138
  },
141
139
  });
142
140
 
143
- // eslint-disable-next-line @typescript-eslint/no-require-imports
144
- require('load-grunt-tasks')(grunt);
141
+ loadGruntTasks(grunt);
145
142
 
146
143
  if (!grunt.option('target')) {
147
144
  grunt.option('target', 'out/');
@@ -167,3 +164,6 @@ export = (grunt: typeof Grunt) => {
167
164
 
168
165
  grunt.registerTask('build', ['clean', 'checkDependencies', 'ts', 'copy']);
169
166
  };
167
+
168
+ // Grunt loads the gruntfile via `require`, so expose the function as `module.exports`
169
+ export { gruntfile as 'module.exports' };
package/VERSION CHANGED
@@ -1 +1 @@
1
- 25.0.1
1
+ 25.0.2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/pinejs",
3
- "version": "25.0.1",
3
+ "version": "25.0.2",
4
4
  "main": "out/server-glue/module.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:balena-io/pinejs.git",
@@ -13,12 +13,12 @@
13
13
  "scripts": {
14
14
  "prepublish": "require-npm4-to-publish",
15
15
  "prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module && npm run build",
16
- "build": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts build",
17
- "webpack-browser": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts browser",
18
- "webpack-module": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts module",
19
- "webpack-server": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts server",
16
+ "build": "grunt --gruntfile Gruntfile.ts build",
17
+ "webpack-browser": "grunt --gruntfile Gruntfile.ts browser",
18
+ "webpack-module": "grunt --gruntfile Gruntfile.ts module",
19
+ "webpack-server": "grunt --gruntfile Gruntfile.ts server",
20
20
  "webpack-build": "npm run webpack-browser && npm run webpack-module && npm run webpack-server",
21
- "lint": "balena-lint -t tsconfig.dev.json -e js -e ts src test build typings Gruntfile.cts && npx tsc --project tsconfig.dev.json --noEmit",
21
+ "lint": "balena-lint -t tsconfig.dev.json -e js -e ts src test build typings Gruntfile.ts && npx tsc --project tsconfig.dev.json --noEmit",
22
22
  "test": "npm run build && npm run lint && npm run webpack-build && npm run test:compose && npm run test:generated-types",
23
23
  "test:start": "DATABASE_URL=postgres://docker:docker@localhost:5431/postgres PINEJS_WEBRESOURCE_MAXFILESIZE=31457280 S3_ENDPOINT=http://localhost:43680 S3_ACCESS_KEY=USERNAME S3_SECRET_KEY=PASSWORD S3_STORAGE_ADAPTER_BUCKET=balena-pine-web-resources S3_REGION=us-east-1 PINEJS_QUEUE_CONCURRENCY=1 TZ=UTC PINEJS_WEBRESOURCE_MULTIPART_ENABLED=true npx mocha",
24
24
  "fasttest-build": "docker compose -f docker-compose.npm-test.yml up -d",
@@ -26,7 +26,7 @@
26
26
  "fasttest-cleanup": "docker compose -f docker-compose.npm-test.yml down",
27
27
  "test:compose": "trap 'npm run fasttest-cleanup ; echo Stopped ; exit 0' INT; npm run fasttest-build && sleep 2 && npm run test:start",
28
28
  "test:generated-types": "npm run generate-types && git diff --exit-code ./src/sbvr-api/user.ts ./src/migrator/migrations.ts ./src/sbvr-api/dev.ts",
29
- "lint-fix": "balena-lint -t tsconfig.dev.json -e js -e ts --fix src test build typings Gruntfile.cts",
29
+ "lint-fix": "balena-lint -t tsconfig.dev.json -e js -e ts --fix src test build typings Gruntfile.ts",
30
30
  "generate-types": "node ./bin/sbvr-compiler.js generate-types ./src/sbvr-api/user.sbvr ./src/sbvr-api/user.ts && node ./bin/sbvr-compiler.js generate-types ./src/migrator/migrations.sbvr ./src/migrator/migrations.ts && node ./bin/sbvr-compiler.js generate-types ./src/sbvr-api/dev.sbvr ./src/sbvr-api/dev.ts && node ./bin/sbvr-compiler.js generate-types ./src/tasks/tasks.sbvr ./src/tasks/tasks.ts && node ./bin/sbvr-compiler.js generate-types ./src/webresource-handler/webresource.sbvr ./src/webresource-handler/webresource.ts && balena-lint -t tsconfig.dev.json --fix ./src/sbvr-api/user.ts ./src/migrator/migrations.ts ./src/sbvr-api/dev.ts"
31
31
  },
32
32
  "dependencies": {
@@ -75,8 +75,6 @@
75
75
  "@balena/pinejs": "file:./",
76
76
  "@balena/pinejs-webresource-s3": "^2.1.27",
77
77
  "@faker-js/faker": "10.6.0",
78
- "@swc-node/register": "1.12.1",
79
- "@swc/core": "1.16.18",
80
78
  "@types/busboy": "1.5.4",
81
79
  "@types/chai": "5.2.3",
82
80
  "@types/grunt": "0.4.32",
@@ -145,12 +143,11 @@
145
143
  "extension": [
146
144
  ".test.ts"
147
145
  ],
148
- "loader": "@swc-node/register/esm-register",
149
146
  "exit": true,
150
147
  "timeout": 60000,
151
148
  "recursive": true
152
149
  },
153
150
  "versionist": {
154
- "publishedAt": "2026-10-28T01:14:52.840Z"
151
+ "publishedAt": "2026-10-28T01:27:18.658Z"
155
152
  }
156
153
  }
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import webpack from 'webpack';
2
2
  import type { Configuration } from 'webpack';
3
- import sharedConfig from './config.cts';
3
+ import sharedConfig from './config.ts';
4
4
 
5
5
  if (typeof sharedConfig.externals !== 'object') {
6
6
  throw new Error('Expected externals to be an object');
@@ -1,11 +1,9 @@
1
- import type { RequiredField } from '../src/sbvr-api/common-types.js' with {
2
- 'resolution-mode': 'import',
3
- };
1
+ import type { RequiredField } from '../src/sbvr-api/common-types.ts';
4
2
 
5
3
  import * as path from 'path';
6
- import * as webpack from 'webpack';
4
+ import webpack from 'webpack';
7
5
  import type { Configuration } from 'webpack';
8
- const root = path.dirname(__dirname);
6
+ const root = path.dirname(import.meta.dirname);
9
7
 
10
8
  const config = {
11
9
  mode: 'production',
@@ -47,6 +45,7 @@ const config = {
47
45
  },
48
46
  },
49
47
  plugins: [
48
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- avoids TS4023 in declaration emit
50
49
  new webpack.optimize.LimitChunkCountPlugin({
51
50
  maxChunks: 1,
52
51
  }) as webpack.WebpackPluginInstance,
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import webpack from 'webpack';
2
2
  import type { Configuration } from 'webpack';
3
- import sharedConfig from './config.cts';
3
+ import sharedConfig from './config.ts';
4
4
 
5
5
  const config: Configuration = {
6
6
  ...sharedConfig,
@@ -1,6 +1,6 @@
1
- import * as webpack from 'webpack';
1
+ import webpack from 'webpack';
2
2
  import type { Configuration } from 'webpack';
3
- import sharedConfig from './config.cts';
3
+ import sharedConfig from './config.ts';
4
4
 
5
5
  const config: Configuration = {
6
6
  ...sharedConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/pinejs",
3
- "version": "25.0.1",
3
+ "version": "25.0.2",
4
4
  "main": "out/server-glue/module.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:balena-io/pinejs.git",
@@ -13,12 +13,12 @@
13
13
  "scripts": {
14
14
  "prepublish": "require-npm4-to-publish",
15
15
  "prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module && npm run build",
16
- "build": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts build",
17
- "webpack-browser": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts browser",
18
- "webpack-module": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts module",
19
- "webpack-server": "grunt --preload @swc-node/register --gruntfile Gruntfile.cts server",
16
+ "build": "grunt --gruntfile Gruntfile.ts build",
17
+ "webpack-browser": "grunt --gruntfile Gruntfile.ts browser",
18
+ "webpack-module": "grunt --gruntfile Gruntfile.ts module",
19
+ "webpack-server": "grunt --gruntfile Gruntfile.ts server",
20
20
  "webpack-build": "npm run webpack-browser && npm run webpack-module && npm run webpack-server",
21
- "lint": "balena-lint -t tsconfig.dev.json -e js -e ts src test build typings Gruntfile.cts && npx tsc --project tsconfig.dev.json --noEmit",
21
+ "lint": "balena-lint -t tsconfig.dev.json -e js -e ts src test build typings Gruntfile.ts && npx tsc --project tsconfig.dev.json --noEmit",
22
22
  "test": "npm run build && npm run lint && npm run webpack-build && npm run test:compose && npm run test:generated-types",
23
23
  "test:start": "DATABASE_URL=postgres://docker:docker@localhost:5431/postgres PINEJS_WEBRESOURCE_MAXFILESIZE=31457280 S3_ENDPOINT=http://localhost:43680 S3_ACCESS_KEY=USERNAME S3_SECRET_KEY=PASSWORD S3_STORAGE_ADAPTER_BUCKET=balena-pine-web-resources S3_REGION=us-east-1 PINEJS_QUEUE_CONCURRENCY=1 TZ=UTC PINEJS_WEBRESOURCE_MULTIPART_ENABLED=true npx mocha",
24
24
  "fasttest-build": "docker compose -f docker-compose.npm-test.yml up -d",
@@ -26,7 +26,7 @@
26
26
  "fasttest-cleanup": "docker compose -f docker-compose.npm-test.yml down",
27
27
  "test:compose": "trap 'npm run fasttest-cleanup ; echo Stopped ; exit 0' INT; npm run fasttest-build && sleep 2 && npm run test:start",
28
28
  "test:generated-types": "npm run generate-types && git diff --exit-code ./src/sbvr-api/user.ts ./src/migrator/migrations.ts ./src/sbvr-api/dev.ts",
29
- "lint-fix": "balena-lint -t tsconfig.dev.json -e js -e ts --fix src test build typings Gruntfile.cts",
29
+ "lint-fix": "balena-lint -t tsconfig.dev.json -e js -e ts --fix src test build typings Gruntfile.ts",
30
30
  "generate-types": "node ./bin/sbvr-compiler.js generate-types ./src/sbvr-api/user.sbvr ./src/sbvr-api/user.ts && node ./bin/sbvr-compiler.js generate-types ./src/migrator/migrations.sbvr ./src/migrator/migrations.ts && node ./bin/sbvr-compiler.js generate-types ./src/sbvr-api/dev.sbvr ./src/sbvr-api/dev.ts && node ./bin/sbvr-compiler.js generate-types ./src/tasks/tasks.sbvr ./src/tasks/tasks.ts && node ./bin/sbvr-compiler.js generate-types ./src/webresource-handler/webresource.sbvr ./src/webresource-handler/webresource.ts && balena-lint -t tsconfig.dev.json --fix ./src/sbvr-api/user.ts ./src/migrator/migrations.ts ./src/sbvr-api/dev.ts"
31
31
  },
32
32
  "dependencies": {
@@ -75,8 +75,6 @@
75
75
  "@balena/pinejs": "file:./",
76
76
  "@balena/pinejs-webresource-s3": "^2.1.27",
77
77
  "@faker-js/faker": "10.6.0",
78
- "@swc-node/register": "1.12.1",
79
- "@swc/core": "1.16.18",
80
78
  "@types/busboy": "1.5.4",
81
79
  "@types/chai": "5.2.3",
82
80
  "@types/grunt": "0.4.32",
@@ -145,12 +143,11 @@
145
143
  "extension": [
146
144
  ".test.ts"
147
145
  ],
148
- "loader": "@swc-node/register/esm-register",
149
146
  "exit": true,
150
147
  "timeout": 60000,
151
148
  "recursive": true
152
149
  },
153
150
  "versionist": {
154
- "publishedAt": "2026-10-28T01:14:52.840Z"
151
+ "publishedAt": "2026-10-28T01:27:18.658Z"
155
152
  }
156
153
  }
package/tsconfig.dev.json CHANGED
@@ -13,6 +13,6 @@
13
13
  "src/**/*",
14
14
  "test/**/*",
15
15
  "typings/**/*.d.ts",
16
- "Gruntfile.cts"
16
+ "Gruntfile.ts"
17
17
  ]
18
18
  }
@@ -0,0 +1,6 @@
1
+ declare module 'load-grunt-tasks' {
2
+ import type * as Grunt from 'grunt';
3
+
4
+ function loadGruntTasks(grunt: typeof Grunt): void;
5
+ export = loadGruntTasks;
6
+ }