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 diff --git a/docs/deprecated.md b/docs/deprecated.md new file mode 100644 index 0000000..805121f --- /dev/null +++ b/docs/deprecated.md @@ -0,0 +1,44 @@ +# 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 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 + +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 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 | 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 = {}; 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 +}