particle-api-js 9.4.0 → 10.0.0
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/.circleci/config.yml +7 -5
- package/.eslintrc.js +3 -3
- package/CHANGELOG.md +8 -0
- package/RELEASE.md +1 -1
- package/dist/particle.min.js +227 -192
- package/dist/particle.min.js.map +1 -1
- package/docs/api.md +561 -103
- package/fs.js +2 -0
- package/lib/Agent.js +320 -221
- package/lib/Agent.js.map +1 -1
- package/lib/Particle.js +645 -62
- package/lib/Particle.js.map +1 -1
- package/package.json +10 -10
- package/test/Agent.integration.js +3 -1
- package/test/Agent.spec.js +173 -289
- package/test/EventStream.spec.js +1 -1
- package/test/Particle.integration.js +5 -4
- package/test/Particle.spec.js +325 -11
- package/lib/superagent-binary-parser.js +0 -20
- package/lib/superagent-binary-parser.js.map +0 -1
- /package/{test/EventStream-e2e-browser.html → EventStream-e2e-browser.html} +0 -0
- /package/{test/EventStream-e2e-node.js → EventStream-e2e-node.js} +0 -0
package/.circleci/config.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
|
|
3
3
|
orbs:
|
|
4
|
-
browser-tools: circleci/browser-tools@1
|
|
4
|
+
browser-tools: circleci/browser-tools@1
|
|
5
5
|
|
|
6
6
|
jobs:
|
|
7
7
|
run-tests:
|
|
@@ -23,15 +23,17 @@ jobs:
|
|
|
23
23
|
command: npm run test:ci
|
|
24
24
|
- when:
|
|
25
25
|
condition:
|
|
26
|
-
equal: ["16.
|
|
26
|
+
equal: ["16.20.0", << parameters.node-version >>]
|
|
27
27
|
steps:
|
|
28
|
-
- browser-tools/install-browser-tools
|
|
28
|
+
- browser-tools/install-browser-tools:
|
|
29
|
+
# Workaround for circleCI automatically targeting unstalbe build https://github.com/CircleCI-Public/browser-tools-orb/issues/90
|
|
30
|
+
chrome-version: 116.0.5845.96 # TODO: remove when chromedriver downloads are fixed
|
|
29
31
|
- run:
|
|
30
32
|
name: Run tests with browser
|
|
31
33
|
command: npm run test:browser
|
|
32
34
|
publish-npm:
|
|
33
35
|
docker:
|
|
34
|
-
- image: cimg/node:16.
|
|
36
|
+
- image: cimg/node:16.20.0 # Primary execution image
|
|
35
37
|
auth:
|
|
36
38
|
username: $DOCKERHUB_USERNAME
|
|
37
39
|
password: $DOCKERHUB_PASSWORD
|
|
@@ -59,7 +61,7 @@ workflows:
|
|
|
59
61
|
- particle-ci-private
|
|
60
62
|
matrix:
|
|
61
63
|
parameters:
|
|
62
|
-
node-version: ["12.22.12", "14.19.2", "16.
|
|
64
|
+
node-version: ["12.22.12", "14.19.2", "16.20.0"]
|
|
63
65
|
# run tests for all branches and tags
|
|
64
66
|
filters:
|
|
65
67
|
tags:
|
package/.eslintrc.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: ['eslint-config-particle'],
|
|
3
3
|
parserOptions: {
|
|
4
|
-
ecmaVersion: 8,
|
|
5
4
|
sourceType: 'module'
|
|
6
5
|
},
|
|
7
6
|
env: {
|
|
@@ -14,8 +13,9 @@ module.exports = {
|
|
|
14
13
|
serviceworker: true
|
|
15
14
|
},
|
|
16
15
|
rules: {
|
|
17
|
-
'no-
|
|
18
|
-
|
|
16
|
+
'no-prototype-builtins': 'off',
|
|
17
|
+
'no-redeclare': 'off',
|
|
18
|
+
camelcase: ['error', {
|
|
19
19
|
properties: 'never',
|
|
20
20
|
allow: ['redirect_uri']
|
|
21
21
|
}]
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# changelog
|
|
2
2
|
|
|
3
|
+
## 10.0.0 - 8 Sept 2023
|
|
4
|
+
|
|
5
|
+
* Change library to handle requests from `superagent` to `fetch`/`node-fetch`
|
|
6
|
+
|
|
7
|
+
## 9.4.1 - 17 June 2022
|
|
8
|
+
|
|
9
|
+
* Fixes incompatible versions of `eslint`, `chai`, `sinon-chai` and `chai-as-promised`.
|
|
10
|
+
|
|
3
11
|
## 9.4.0 - 14 June 2022
|
|
4
12
|
|
|
5
13
|
* Adds `.setDefaultAuth(auth)` so token authenticated methods don't need to pass their own auth token.
|
package/RELEASE.md
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
5. Create a release on GitHub with the notes from the `CHANGELOG.md`
|
|
10
10
|
6. Point your project to the new version `npm install particle-api-js@latest`
|
|
11
11
|
|
|
12
|
-
- After updating major version, update the installation instructions in the [docs](https://github.com/particle-iot/docs/blob/master/src/content/reference/
|
|
12
|
+
- After updating major version, update the installation instructions in the [docs](https://github.com/particle-iot/docs/blob/master/src/content/reference/cloud-apis/javascript.md)
|