particle-api-js 11.1.4 → 11.1.6

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.
@@ -4,6 +4,20 @@ orbs:
4
4
  browser-tools: circleci/browser-tools@2.2.0
5
5
 
6
6
  jobs:
7
+ lint:
8
+ docker:
9
+ - image: cimg/node:22.18 # eslint 9.x requires 18+, so we've separated it from the test step
10
+ auth:
11
+ username: $DOCKERHUB_USERNAME
12
+ password: $DOCKERHUB_PASSWORD
13
+ steps:
14
+ - checkout
15
+ - run:
16
+ name: NPM install
17
+ command: npm ci
18
+ - run:
19
+ name: Lint
20
+ command: npm run lint
7
21
  run-tests:
8
22
  parameters:
9
23
  node-version:
@@ -57,12 +71,19 @@ workflows:
57
71
  version: 2
58
72
  test-and-publish:
59
73
  jobs:
74
+ - lint:
75
+ context:
76
+ - particle-ci-private
77
+ # run tests for all branches
78
+ filters:
79
+ branches:
80
+ only: /.*/
60
81
  - run-tests:
61
82
  context:
62
83
  - particle-ci-private
63
84
  matrix:
64
85
  parameters:
65
- node-version: ["12.22.12", "14.19.2", "16.20.0"]
86
+ node-version: ["16.20.0", "22.18"]
66
87
  # run tests for all branches and tags
67
88
  filters:
68
89
  tags:
@@ -71,6 +92,7 @@ workflows:
71
92
  only: /.*/
72
93
  - publish-npm:
73
94
  requires:
95
+ - lint
74
96
  - run-tests
75
97
  context:
76
98
  - particle-ci-private
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 16
1
+ 22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # changelog
2
2
 
3
+ ## 11.1.6 - 20 September 2025
4
+ * Fix request params to support `FormData` passed in the data argument
5
+ * Update docs on queries receiving `data`
6
+ * Update eslint configuration
7
+
8
+ ## 11.1.5 - 19 September 2025
9
+ * Ensure node 22 works as expected
10
+ * Remove node 12 validations
11
+ * Update eslint configuration
12
+
3
13
  ## 11.1.4 - 20 August 2025
4
14
  * Clarify license is Apache 2.0
5
15
 
@@ -7,7 +7,7 @@ Steps:
7
7
  - Follow the scenarios in EventStream.feature
8
8
 
9
9
  */
10
-
10
+ 'use strict';
11
11
  const Particle = require('./src/Particle');
12
12
  const baseUrl = process.env.PARTICLE_API_BASE_URL || 'http://localhost:9090';
13
13
  const auth = process.env.PARTICLE_API_TOKEN;
@@ -16,19 +16,19 @@ const particle = new Particle({ baseUrl });
16
16
 
17
17
  /* eslint-disable no-console */
18
18
  particle.getEventStream({ deviceId: 'mine', auth })
19
- .then(stream => {
20
- console.log('event stream connected');
21
-
22
- ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error']
23
- .forEach(eventName => {
24
- stream.on(eventName, (arg) => {
25
- console.log(eventName, arg);
26
- });
27
- });
28
- })
29
- .catch((err) => {
30
- console.error(err);
31
- process.exit(1);
32
- });
19
+ .then(stream => {
20
+ console.log('event stream connected');
21
+
22
+ ['event', 'error', 'disconnect', 'reconnect', 'reconnect-success', 'reconnect-error']
23
+ .forEach(eventName => {
24
+ stream.on(eventName, (arg) => {
25
+ console.log(eventName, arg);
26
+ });
27
+ });
28
+ })
29
+ .catch((err) => {
30
+ console.error(err);
31
+ process.exit(1);
32
+ });
33
33
  /* eslint-enable no-console */
34
34