From 7c120aa772ed3dbba6a80e20f55fbd342c3f5931 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Mon, 4 Jan 2021 15:10:30 +0100 Subject: [PATCH 1/6] Update ci.yml Add Node 14 to unit-test matrix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f929efb..fd16824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,7 @@ jobs: node-version: - 10.x - 12.x + - 14.x steps: - name: Git checkout uses: actions/checkout@v2 From 5e1fcb95c2e3b48a3c1288f649902a8d1bfb1f61 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Mon, 4 Jan 2021 16:58:07 +0100 Subject: [PATCH 2/6] Update NGSI-v2 expectation to offer nulls rather than blanks Consequence of merging https://github.com/telefonicaid/iotagent-node-lib/pull/946 --- .../expectedProvisioningPluginRequest.json | 14 +-- .../expectedProvisioningRequest.json | 20 ++-- .../expectedDeviceRegisterRequest.json | 106 +++++++++--------- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/test/examples/deviceProvisioning/expectedProvisioningPluginRequest.json b/test/examples/deviceProvisioning/expectedProvisioningPluginRequest.json index cf0326f..7769bd5 100644 --- a/test/examples/deviceProvisioning/expectedProvisioningPluginRequest.json +++ b/test/examples/deviceProvisioning/expectedProvisioningPluginRequest.json @@ -8,35 +8,35 @@ { "name": "time", "type": "String", - "value": " " + "value": null }, { "name": "statin", "type": "String", - "value": " " + "value": null }, { "name": "lng", "type": "String", - "value": " " + "value": null }, { "name": "lat", "type": "String", - "value": " " + "value": null }, { "name": "campo1", "type": "Integer", - "value": " " + "value": null }, { "name": "campo2", "type": "Integer", - "value": " " + "value": null } ] } ], "updateAction": "APPEND" -} \ No newline at end of file +} diff --git a/test/examples/deviceProvisioning/expectedProvisioningRequest.json b/test/examples/deviceProvisioning/expectedProvisioningRequest.json index b15f268..e35ed34 100644 --- a/test/examples/deviceProvisioning/expectedProvisioningRequest.json +++ b/test/examples/deviceProvisioning/expectedProvisioningRequest.json @@ -8,50 +8,50 @@ { "name": "time", "type": "String", - "value": " " + "value": null }, { "name": "statin", "type": "String", - "value": " " + "value": null }, { "name": "lng", "type": "String", - "value": " " + "value": null }, { "name": "lat", "type": "String", - "value": " " + "value": null }, { "name": "theCounter", "type": "Integer", - "value": " " + "value": null }, { "name": "theParam1", "type": "Integer", - "value": " " + "value": null }, { "name": "param2", "type": "Integer", - "value": " " + "value": null }, { "name": "tempDegreesCelsius", "type": "Integer", - "value": " " + "value": null }, { "name": "voltage", "type": "Integer", - "value": " " + "value": null } ] } ], "updateAction": "APPEND" -} \ No newline at end of file +} diff --git a/test/examples/ngsi-communication/expectedDeviceRegisterRequest.json b/test/examples/ngsi-communication/expectedDeviceRegisterRequest.json index c1d285f..1970e16 100644 --- a/test/examples/ngsi-communication/expectedDeviceRegisterRequest.json +++ b/test/examples/ngsi-communication/expectedDeviceRegisterRequest.json @@ -1,57 +1,57 @@ { "contextElements": [ - { - "type": "SIGFOX", - "isPattern": "false", - "id": "SIGFOX:sigApp1", - "attributes": [ - { - "name": "time", - "type": "String", - "value": " " - }, - { - "name": "statin", - "type": "String", - "value": " " - }, - { - "name": "lng", - "type": "String", - "value": " " - }, - { - "name": "lat", - "type": "String", - "value": " " - }, - { - "name": "counter", - "type": "Integer", - "value": " " - }, - { - "name": "param1", - "type": "Integer", - "value": " " - }, - { - "name": "param2", - "type": "Integer", - "value": " " - }, - { - "name": "tempDegreesCelsius", - "type": "Integer", - "value": " " - }, - { - "name": "voltage", - "type": "Integer", - "value": " " - } - ] - } + { + "type": "SIGFOX", + "isPattern": "false", + "id": "SIGFOX:sigApp1", + "attributes": [ + { + "name": "time", + "type": "String", + "value": null + }, + { + "name": "statin", + "type": "String", + "value": null + }, + { + "name": "lng", + "type": "String", + "value": null + }, + { + "name": "lat", + "type": "String", + "value": null + }, + { + "name": "counter", + "type": "Integer", + "value": null + }, + { + "name": "param1", + "type": "Integer", + "value": null + }, + { + "name": "param2", + "type": "Integer", + "value": null + }, + { + "name": "tempDegreesCelsius", + "type": "Integer", + "value": null + }, + { + "name": "voltage", + "type": "Integer", + "value": null + } + ] + } ], "updateAction": "APPEND" -} \ No newline at end of file +} From 7d0ed6a98aba74adde320a34a67ed336c1433815 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Mon, 4 Jan 2021 17:04:56 +0100 Subject: [PATCH 3/6] new Buffer() is deprecated from Node 10 Use Buffer.from() in preference to new Buffer() --- lib/sigfoxParser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sigfoxParser.js b/lib/sigfoxParser.js index 4a2b628..35d0f4c 100644 --- a/lib/sigfoxParser.js +++ b/lib/sigfoxParser.js @@ -45,7 +45,7 @@ function createParser(key) { }, []); return function parse(rawData, callback) { - const buf = new Buffer(rawData, 'hex'); + const buf = Buffer.from(rawData, 'hex'); let offset = 0; let fieldIndex = 0; const data = {}; From 29a625a41e7677f66b98cc6f2a708dab061bc9c9 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Mon, 4 Jan 2021 17:26:58 +0100 Subject: [PATCH 4/6] Add deprecation notice --- docs/deprecated.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/deprecated.md diff --git a/docs/deprecated.md b/docs/deprecated.md new file mode 100644 index 0000000..9821141 --- /dev/null +++ b/docs/deprecated.md @@ -0,0 +1,41 @@ +# Deprecated functionality + +Deprecated features are features that sigfox-iotagent stills support but that are not maintained or evolved any longer. In +particular: + +- Bugs or issues related with deprecated features and not affecting any other feature are not addressed (they are + closed in github.com as soon as they are spotted). +- Documentation on deprecated features is removed from the repository documentation. Documentation is still available + in the documentation set associated to older versions (in the repository release branches). +- Deprecated functionality is eventually removed from sigfox-iotagent. Thus you are strongly encouraged to change your + implementations using sigfox-iotagent in order not rely on deprecated functionality. + +A list of deprecated features and the version in which they were deprecated follows: + +- Support to NGSI v1. +- Support to Node.js v10 in sigfox-iotagent 1.5.0. The use of Node.js v12 is highly recommended. + +## Using old sigfox-iotagent versions + +Although you are encouraged to use always the newest sigfox-iotagent version, take into account the following information in +the case you want to use old versions: + +- Code corresponding to old releases is available at the + [sigfox-iotagent GitHub repository](https://github.com/telefonicaid/sigfox-iotagent). Each release number (e.g. 1.7.0 ) has + associated the following: - A tag, e.g. `1.7.0`. It points to the base version. - A release branch, `release/1.7.0`. + The HEAD of this branch usually matches the aforementioned tag. However, if some hotfixes were developed on the base + version, this branch contains such hotfixes. +- Documentation corresponding to old versions can be found at + [readthedocs.io](https://iotagent-sigfox.readthedocs.io/en/latest/). Use the panel in the right bottom corner to navigate to + the right version. +- Docker images corresponding to sigfox-iotagent can be found at + [Dockerhub](https://hub.docker.com/r/fiware/sigfox-iotagent/tags/). + +The following table provides information about the last sigfox-iotagent version supporting currently removed features: + +| **Removed feature** | **Last sigfox-iotagent version supporting feature** | **That version release date** | +| --------------------- | ----------------------------------------------- | ----------------------------- | +| NGSIv1 API | Not yet defined | Not yet defined | +| Support to Node.js v6 | Not yet defined but it will be done by May 2019 | Not yet defined | +| Support to Node.js v4 | 1.8.0 | December 19th, 2018 | +| Support to Node.js v10 | Not defined but it will completed before May 2021 | Not yet defined | From 173022aea1976b62dca3febf5dbd62e8b0485778 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Fri, 8 Jan 2021 13:16:01 +0100 Subject: [PATCH 5/6] Update docs/deprecated.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- docs/deprecated.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/deprecated.md b/docs/deprecated.md index 9821141..5d6c301 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -13,6 +13,8 @@ particular: A list of deprecated features and the version in which they were deprecated follows: - Support to NGSI v1. +- Support to Node.js v4 and v6 in sigfox-iotagent 1.0.0 (finally removed in 1.1.0) +- Support to Node.js v8 in sigfox-iotagent 1.4.0 (finally removed in 1.5.0) - Support to Node.js v10 in sigfox-iotagent 1.5.0. The use of Node.js v12 is highly recommended. ## Using old sigfox-iotagent versions From d9a6c8ac17d2f6dda9c265386e6ae2c16c2366f9 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Fri, 8 Jan 2021 13:16:25 +0100 Subject: [PATCH 6/6] Update docs/deprecated.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- docs/deprecated.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/deprecated.md b/docs/deprecated.md index 5d6c301..805121f 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -38,6 +38,7 @@ The following table provides information about the last sigfox-iotagent version | **Removed feature** | **Last sigfox-iotagent version supporting feature** | **That version release date** | | --------------------- | ----------------------------------------------- | ----------------------------- | | NGSIv1 API | Not yet defined | Not yet defined | -| Support to Node.js v6 | Not yet defined but it will be done by May 2019 | Not yet defined | -| Support to Node.js v4 | 1.8.0 | December 19th, 2018 | +| Support to Node.js v4 | 1.0.0 | June 13th, 2018 | +| Support to Node.js v6 | 1.0.0 | June 13th, 2018 | +| Support to Node.js v8 | 1.4.0 | April 8th, 2020 | | Support to Node.js v10 | Not defined but it will completed before May 2021 | Not yet defined |