chore(crypto-nodejs): Drop Node.js v12.17.

There is a segfault with `napi-rs` and Node.js in v12.17. It's an old
version, it may be fair to drop its support for now. Let's see if
people would need it in the future, we may work on `napi-rs` to fix
this bug in case it's really necessary.
This commit is contained in:
Ivan Enderlin
2022-06-13 17:17:19 +02:00
parent 83b730d1c8
commit 3833d35348
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ jobs:
strategy:
fail-fast: true
matrix:
node-version: [12.17, 14.0, 15.0, 16.0]
node-version: [14.0, 15.0, 16.0]
include:
- node-version: 16.0
build-doc: true
+3 -3
View File
@@ -19,10 +19,10 @@ Node.js and npm
Page](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
The binding is using NAPI 6 (Node API version 6), which means that is
compatible with Node.js versions 12.17.0, 14.0.0, 15.0.0 and 16.0.0
(see [the full Node API version
compatible with Node.js versions 14.0.0, 15.0.0 and 16.0.0 (see [the
full Node API version
matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix))
(we do not support the version 10.20).
(we do not support the versions 10.20 and 12.17.0).
Once the Rust compiler, Node.js and npm are installed, you can run the
following commands:
@@ -1,7 +1,7 @@
const { OlmMachine, UserId, DeviceId, RoomId, DeviceLists, RequestType, KeysUploadRequest, KeysQueryRequest, KeysClaimRequest, EncryptionSettings, DecryptedRoomEvent, VerificationState } = require('../');
const path = require('path');
const os = require('os');
const fs = require('fs');
const fs = require('fs/promises');
describe(OlmMachine.name, () => {
test('cannot be instantiated with the constructor', () => {
@@ -14,13 +14,13 @@ describe(OlmMachine.name, () => {
describe('can be instantiated with a store', () => {
test('with no passphrase', async () => {
const temp_directory = fs.mkdtempSync(path.join(os.tmpdir(), 'matrix-sdk-crypto--'));
const temp_directory = await fs.mkdtemp(path.join(os.tmpdir(), 'matrix-sdk-crypto--'));
expect(await OlmMachine.initialize(new UserId('@foo:bar.org'), new DeviceId('baz'), temp_directory)).toBeInstanceOf(OlmMachine);
});
test('with a passphrase', async () => {
const temp_directory = fs.mkdtempSync(path.join(os.tmpdir(), 'matrix-sdk-crypto--'));
const temp_directory = await fs.mkdtemp(path.join(os.tmpdir(), 'matrix-sdk-crypto--'));
expect(await OlmMachine.initialize(new UserId('@foo:bar.org'), new DeviceId('baz'), temp_directory, 'hello')).toBeInstanceOf(OlmMachine);
});