diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index cbd24eba97..9b0c9b2a5f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: node: - - 16.10.0 + - 18.12.0 os: - macos-latest - ubuntu-20.04 diff --git a/.github/workflows/package_for_test.yml b/.github/workflows/package_for_test.yml index b29bf8b750..40d513297a 100644 --- a/.github/workflows/package_for_test.yml +++ b/.github/workflows/package_for_test.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: node: - - 16.10.0 + - 18.12.0 os: - macos-latest - ubuntu-20.04 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 803d2f2cd2..03d50b7d05 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: node: - - 16.10.0 + - 18.12.0 os: - macos-latest - ubuntu-20.04 diff --git a/README.md b/README.md index 8a23aaa830..d18adf569e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Nervos CKB Full-Node Desktop Wallet ### Prerequisites -You will need `node >= 16` and `yarn >= 1.14` to build and run Neuron. +You will need `node >= 18.12.0` and `yarn >= 1.14` to build and run Neuron. #### Lerna diff --git a/package.json b/package.json index 2fae632561..aea0ae37fb 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "license": "MIT", "engines": { - "node": ">= 16.0", + "node": ">= 18.12", "yarn": ">= 1.14" }, "workspaces": [ @@ -32,7 +32,7 @@ "build:main": "lerna run build --scope=neuron-wallet", "release": "yarn build && ./scripts/copy-ui-files.sh && ./scripts/release.sh", "package:test": "yarn build && ./scripts/copy-ui-files.sh && ./scripts/package-for-test.sh", - "test": "lerna run --parallel test", + "test": "cross-env NODE_OPTIONS=--openssl-legacy-provider lerna run --parallel test", "test:ci": "yarn build:main && yarn test", "lint": "lerna run --stream lint", "postinstall": "lerna run build --scope=@nervina-labs/ckb-indexer", diff --git a/packages/neuron-wallet/package.json b/packages/neuron-wallet/package.json index 4afd79b8c7..90c74a79d6 100644 --- a/packages/neuron-wallet/package.json +++ b/packages/neuron-wallet/package.json @@ -59,7 +59,7 @@ "reflect-metadata": "0.1.13", "rxjs": "6.5.3", "sha3": "2.0.7", - "sqlite3": "5.0.8", + "sqlite3": "5.1.2", "subleveldown": "4.1.4", "typeorm": "0.2.25", "uuid": "8.3.2", diff --git a/packages/neuron-wallet/src/utils/to-csv-row.ts b/packages/neuron-wallet/src/utils/to-csv-row.ts index cbf402f66b..aff1687732 100644 --- a/packages/neuron-wallet/src/utils/to-csv-row.ts +++ b/packages/neuron-wallet/src/utils/to-csv-row.ts @@ -41,7 +41,7 @@ const toCSVRow = ( txType = +tx.sudtInfo.amount <= 0 ? `UDT ${SEND_TYPE}` : `UDT ${RECEIVE_TYPE}` } } else { - amount = shannonToCKB(BigInt(tx.value)) + amount = shannonToCKB(BigInt(tx.value!)) if (tx.nervosDao) { txType = `Nervos DAO` } else if (['create', 'destroy'].includes(tx.type || '')) { diff --git a/packages/neuron-wallet/tests/services/address.test.ts b/packages/neuron-wallet/tests/services/address.test.ts index 1ccbe876b0..4c5e5a37da 100644 --- a/packages/neuron-wallet/tests/services/address.test.ts +++ b/packages/neuron-wallet/tests/services/address.test.ts @@ -28,11 +28,7 @@ const randomHex = (length: number = 64): string => { return `0x${str}` } -const generateCell = ( - capacity: string, - lockScript: any, - status: OutputStatus, -) => { +const generateCell = (capacity: string, lockScript: any, status: OutputStatus) => { const output = new OutputEntity() output.outPointTxHash = randomHex() output.outPointIndex = '0' @@ -90,17 +86,13 @@ jest.mock('models/subjects/address-db-changed-subject', () => ({ describe('integration tests for AddressService', () => { const AddressService = require('../../src/services/addresses').default - const notifyAddressCreatedStub = jest.spyOn(AddressService, 'notifyAddressCreated'); - notifyAddressCreatedStub.mockImplementation(() => { }); + const notifyAddressCreatedStub = jest.spyOn(AddressService, 'notifyAddressCreated') + notifyAddressCreatedStub.mockImplementation(() => {}) beforeAll(() => { for (let addressType = 0; addressType <= 1; addressType++) { for (let addressIndex = 0; addressIndex <= 7; addressIndex++) { - const address = extendedKey.address( - addressType, - addressIndex, - true, - ) + const address = extendedKey.address(addressType, addressIndex, true) preloadedPublicKeys.push({ address, addressType, @@ -113,18 +105,14 @@ describe('integration tests for AddressService', () => { const stubbedExtendedKeyAddressFn = when(jest.spyOn(extendedKey, 'address')) for (const addressToMock of preloadedPublicKeys) { stubbedExtendedKeyAddressFn - .calledWith( - addressToMock.addressType, - addressToMock.addressIndex, - true, - ) + .calledWith(addressToMock.addressType, addressToMock.addressIndex, true) .mockReturnValue(addressToMock.address) } }) beforeEach(() => { notifyAddressCreatedStub.mockReset() - }); + }) describe('Key tests with db', () => { const isImporting = undefined @@ -153,7 +141,6 @@ describe('integration tests for AddressService', () => { const changeAddressCount = 4 describe('when the newly created public keys have not been used', () => { - beforeEach(async () => { await AddressService.generateAndSaveForExtendedKey( walletId, @@ -163,7 +150,7 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('generates both receiving and change addresses', () => { expect(generatedAddresses.length).toEqual(receivingAddressCount + changeAddressCount) @@ -184,8 +171,12 @@ describe('integration tests for AddressService', () => { describe('when receiving and change addresses are used', () => { beforeEach(async () => { - const receivingAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Receiving) - const changeAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Change) + const receivingAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Receiving + ) + const changeAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Change + ) await linkNewCell([receivingAddresses[0].blake160, changeAddresses[0].blake160]) await AddressService.generateAndSaveForExtendedKey( @@ -196,7 +187,7 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('generates new addresses for both receiving and change', () => { expect(generatedAddresses.length).toEqual((receivingAddressCount + changeAddressCount) * 2) const receivingAddresses = generatedAddresses.filter(addr => addr.addressType === AddressType.Receiving) @@ -207,8 +198,8 @@ describe('integration tests for AddressService', () => { for (let i = 0; i < changeAddresses.length; i++) { expect(changeAddresses[i].addressIndex).toEqual(i) } - }); - }); + }) + }) describe('when none of public keys are used', () => { beforeEach(async () => { await AddressService.generateAndSaveForExtendedKey( @@ -219,15 +210,17 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('should not generate new addresses', () => { expect(generatedAddresses.length).toEqual(receivingAddressCount + changeAddressCount) - }); - }); + }) + }) describe('when receiving public keys are used', () => { beforeEach(async () => { - const receivingAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Receiving) + const receivingAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Receiving + ) await linkNewCell([receivingAddresses[0].blake160]) await AddressService.generateAndSaveForExtendedKey( @@ -238,20 +231,26 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('generates addresses for receiving', () => { - const receivingAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Receiving) + const receivingAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Receiving + ) expect(receivingAddresses.length).toEqual(receivingAddressCount * 2) - }); + }) it('should not generates addresses for change', () => { - const changeAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Change) + const changeAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Change + ) expect(changeAddresses.length).toEqual(changeAddressCount) }) - }); + }) describe('when change public keys are used', () => { beforeEach(async () => { - const changeAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Change) + const changeAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Change + ) await linkNewCell([changeAddresses[0].blake160]) await AddressService.generateAndSaveForExtendedKey( @@ -262,24 +261,24 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('generates addresses for change', () => { - const changeAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Change) + const changeAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Change + ) expect(changeAddresses.length).toEqual(changeAddressCount * 2) - }); + }) it('should not generates addresses for receiving', () => { - const receivingAddresses = generatedAddresses.filter((addr: Address) => addr.addressType === AddressType.Receiving) + const receivingAddresses = generatedAddresses.filter( + (addr: Address) => addr.addressType === AddressType.Receiving + ) expect(receivingAddresses.length).toEqual(receivingAddressCount) }) - }); - }); + }) + }) describe('when newly generated public keys in the first batch are already used', () => { beforeEach(async () => { - await linkNewCell( - preloadedPublicKeys - .filter((k: any) => k.addressIndex < 4) - .map((k: any) => k.publicKeyHash) - ) + await linkNewCell(preloadedPublicKeys.filter((k: any) => k.addressIndex < 4).map((k: any) => k.publicKeyHash)) await AddressService.generateAndSaveForExtendedKey( walletId, @@ -289,7 +288,7 @@ describe('integration tests for AddressService', () => { changeAddressCount ) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('recursively generates both receiving and change addresses', () => { expect(generatedAddresses.length).toEqual((receivingAddressCount + changeAddressCount) * 2) @@ -307,25 +306,22 @@ describe('integration tests for AddressService', () => { expect(notifyAddressCreatedStub).toHaveBeenCalledWith(generatedAddresses, undefined) }) }) - }); + }) describe('#generateAndSaveForPublicKey', () => { - describe('with public key info exist for the public key', () => { const publicKey = 'public key' const addressType = AddressType.Receiving const addressIndex = 0 beforeEach(async () => { - await AddressService.generateAndSaveForPublicKey( - { - walletId, - publicKey, - addressType, - addressIndex - } - ) + await AddressService.generateAndSaveForPublicKey({ + walletId, + publicKey, + addressType, + addressIndex + }) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('generates one address', () => { expect(generatedAddresses.length).toEqual(1) }) @@ -344,7 +340,7 @@ describe('integration tests for AddressService', () => { addressIndex }) generatedAddresses = await AddressService.getAddressesByWalletId(walletId) - }); + }) it('should not generate new address', () => { expect(generatedAddresses.length).toEqual(1) }) @@ -353,7 +349,7 @@ describe('integration tests for AddressService', () => { expect(notifyAddressCreatedStub).toHaveBeenCalledTimes(0) }) }) - }); + }) }) describe('#getAddressesByAllWallets', () => { @@ -376,14 +372,14 @@ describe('integration tests for AddressService', () => { changeAddressCount ) allAddresses = await AddressService.getAddressesByAllWallets() - }); + }) it('returns all addresses', () => { const addressCountPerWallet = receivingAddressCount + changeAddressCount expect(allAddresses.length).toEqual(addressCountPerWallet * 2) expect(allAddresses.filter(addr => addr.walletId === '1').length).toEqual(addressCountPerWallet) expect(allAddresses.filter(addr => addr.walletId === '2').length).toEqual(addressCountPerWallet) }) - }); + }) describe('#getFirstAddressByAllWalletId', () => { const receivingAddressCount = 4 @@ -399,15 +395,17 @@ describe('integration tests for AddressService', () => { changeAddressCount ) address = await AddressService.getFirstAddressByWalletId(walletId) - }); + }) it('returns the first addresses by by wallet id', () => { - expect(address).toEqual(expect.objectContaining({ - walletId, - addressIndex: 0, - addressType: 0, - })) + expect(address).toEqual( + expect.objectContaining({ + walletId, + addressIndex: 0, + addressType: 0 + }) + ) }) - }); + }) describe('#nextUnusedAddress', () => { const receivingAddressCount = 2 @@ -425,13 +423,13 @@ describe('integration tests for AddressService', () => { generatedAddresses = await AddressService.getAddressesByWalletId(walletId) publicKeysToUse = [generatedAddresses[0].blake160] await linkNewCell(publicKeysToUse) - }); + }) it('returns next unused receiving address', async () => { const nextUnusedAddress = await AddressService.getNextUnusedAddressByWalletId(walletId) expect(nextUnusedAddress).toEqual(generatedAddresses[publicKeysToUse.length]) expect(nextUnusedAddress.addressType).toEqual(AddressType.Receiving) }) - }); + }) describe('when there are unused change addresses but no receiving addresses', () => { beforeEach(async () => { await AddressService.generateAndSaveForExtendedKey( @@ -447,13 +445,13 @@ describe('integration tests for AddressService', () => { .map((addr: Address) => addr.blake160) await linkNewCell(publicKeysToUse) - }); + }) it('returns next unused change address', async () => { const nextUnusedAddress = await AddressService.getNextUnusedAddressByWalletId(walletId) expect(nextUnusedAddress).toEqual(generatedAddresses[publicKeysToUse.length]) expect(nextUnusedAddress.addressType).toEqual(AddressType.Change) }) - }); + }) describe('when there is no receiving or change unused address', () => { beforeEach(async () => { await AddressService.generateAndSaveForExtendedKey( @@ -467,13 +465,13 @@ describe('integration tests for AddressService', () => { publicKeysToUse = generatedAddresses.map((addr: Address) => addr.blake160) await linkNewCell(publicKeysToUse) - }); + }) it('returns next unused change address', async () => { const nextUnusedAddress = await AddressService.getNextUnusedAddressByWalletId(walletId) expect(nextUnusedAddress).toEqual(undefined) }) - }); - }); + }) + }) describe('#allUnusedReceivingAddresses', () => { let publicKeysToUse = [] @@ -491,7 +489,7 @@ describe('integration tests for AddressService', () => { generatedAddresses = await AddressService.getAddressesByWalletId(walletId) publicKeysToUse = [generatedAddresses[0].blake160] await linkNewCell(publicKeysToUse) - }); + }) it('returns the unused receiving addresses', async () => { const allUnusedReceivingAddresses = await AddressService.getUnusedReceivingAddressesByWalletId(walletId) expect(allUnusedReceivingAddresses.length).toEqual(receivingAddressCount - publicKeysToUse.length) @@ -499,7 +497,7 @@ describe('integration tests for AddressService', () => { expect(unusedAddress.addressType).toEqual(AddressType.Receiving) } }) - }); + }) describe('when there is no unused receiving address', () => { beforeEach(async () => { await AddressService.generateAndSaveForExtendedKey( @@ -512,13 +510,13 @@ describe('integration tests for AddressService', () => { generatedAddresses = await AddressService.getAddressesByWalletId(walletId) publicKeysToUse = generatedAddresses.map((addr: Address) => addr.blake160) await linkNewCell(publicKeysToUse) - }); + }) it('returns empty array', async () => { const allUnusedReceivingAddresses = await AddressService.getUnusedReceivingAddressesByWalletId(walletId) expect(allUnusedReceivingAddresses).toEqual([]) }) - }); - }); + }) + }) describe('#nextUnusedChangeAddress', () => { let publicKeysToUse = [] @@ -532,19 +530,19 @@ describe('integration tests for AddressService', () => { receivingAddressCount, changeAddressCount ) - }); + }) describe('when there are unused change addresses', () => { beforeEach(async () => { generatedAddresses = await AddressService.getAddressesByWalletId(walletId) publicKeysToUse = [generatedAddresses[changeAddressCount].blake160] await linkNewCell(publicKeysToUse) - }); + }) it('returns the unused receiving addresses', async () => { const nextUnusedChangeAddress = await AddressService.getNextUnusedChangeAddressByWalletId(walletId) expect(nextUnusedChangeAddress).toEqual(generatedAddresses[changeAddressCount + 1]) expect(nextUnusedChangeAddress.addressType).toEqual(AddressType.Change) }) - }); + }) describe('when there is no unused receiving address', () => { beforeEach(async () => { generatedAddresses = await AddressService.getAddressesByWalletId(walletId) @@ -552,13 +550,13 @@ describe('integration tests for AddressService', () => { .filter((addr: Address) => addr.addressType === AddressType.Change) .map((addr: Address) => addr.blake160) await linkNewCell(publicKeysToUse) - }); + }) it('returns undefined', async () => { const nextUnusedChangeAddress = await AddressService.getNextUnusedChangeAddressByWalletId(walletId) expect(nextUnusedChangeAddress).toEqual(undefined) }) - }); - }); + }) + }) describe('#getAddressesWithBalancesByWalletId', () => { let publicKeysToUse: string[] = [] @@ -580,21 +578,23 @@ describe('integration tests for AddressService', () => { await linkNewCell([publicKeysToUse[0]], '3', OutputStatus.Pending) await linkNewCell([publicKeysToUse[0]], '4', OutputStatus.Failed) await linkNewCell([publicKeysToUse[0]], '5', OutputStatus.Dead) - }); + }) it('calculates balances', async () => { const allAddresses = await AddressService.getAddressesWithBalancesByWalletId(walletId) expect(allAddresses[0].blake160).toEqual(publicKeysToUse[0]) expect(allAddresses[0].liveBalance).toEqual('1') expect(allAddresses[0].sentBalance).toEqual('2') expect(allAddresses[0].pendingBalance).toEqual('3') - expect(allAddresses[0].balance).toEqual((parseInt(allAddresses[0].liveBalance) + parseInt(allAddresses[0].sentBalance)).toString()) + expect(allAddresses[0].balance).toEqual( + (parseInt(allAddresses[0].liveBalance) + parseInt(allAddresses[0].sentBalance)).toString() + ) expect(allAddresses[1].liveBalance).toEqual('0') expect(allAddresses[1].sentBalance).toEqual('0') expect(allAddresses[1].pendingBalance).toEqual('0') expect(allAddresses[1].balance).toEqual('0') }) - }); + }) describe('#updateDescription', () => { let addressToUpdate: any @@ -663,52 +663,41 @@ describe('integration tests for AddressService', () => { expect(overrides.length).toEqual(1) expect(overrides[0].address).toEqual(addressToUpdate.address) }) - }); - }); - }); + }) + }) + }) describe('create', () => { it('create with exist', async () => { - const { receiving } = await AddressService.generateAddresses( - walletId, - extendedKey, - 0, - 0, - 5, - 5 - ) - await getConnection().manager.save(receiving.map((addr: any) => { - return HdPublicKeyInfo.fromObject({ - ...addr, - publicKeyInBlake160: addr.blake160 + const { receiving } = await AddressService.generateAddresses(walletId, extendedKey, 0, 0, 5, 5) + await getConnection().manager.save( + receiving.map((addr: any) => { + return HdPublicKeyInfo.fromObject({ + ...addr, + publicKeyInBlake160: addr.blake160 + }) }) - })) + ) await AddressService.create({ addresses: receiving }) expect(stubbedAddressDbChangedSubjectNext).toHaveBeenCalledTimes(0) }) it('create with more than one wallet', async () => { - await expect(AddressService.create({ - addresses: [ - { walletId: '1' }, - { walletId: '2' } - ] - })).rejects.toThrow(new Error('Addresses can only be created for one wallet at a time')) + await expect( + AddressService.create({ + addresses: [{ walletId: '1' }, { walletId: '2' }] + }) + ).rejects.toThrow(new Error('Addresses can only be created for one wallet at a time')) }) it('create with some exist', async () => { - const { receiving, change } = await AddressService.generateAddresses( - walletId, - extendedKey, - 0, - 0, - 5, - 5 - ) - await getConnection().manager.save(receiving.map((addr: any) => { - return HdPublicKeyInfo.fromObject({ - ...addr, - publicKeyInBlake160: addr.blake160 + const { receiving, change } = await AddressService.generateAddresses(walletId, extendedKey, 0, 0, 5, 5) + await getConnection().manager.save( + receiving.map((addr: any) => { + return HdPublicKeyInfo.fromObject({ + ...addr, + publicKeyInBlake160: addr.blake160 + }) }) - })) + ) await AddressService.create({ addresses: [...receiving, ...change] }) @@ -716,4 +705,4 @@ describe('integration tests for AddressService', () => { }) }) }) -}); +}) diff --git a/packages/neuron-wallet/tests/utils/redist-check/index.test.ts b/packages/neuron-wallet/tests/utils/redist-check/index.test.ts index 6ce5a0205f..807a475831 100644 --- a/packages/neuron-wallet/tests/utils/redist-check/index.test.ts +++ b/packages/neuron-wallet/tests/utils/redist-check/index.test.ts @@ -1,26 +1,26 @@ -import redistCheck from '../../../src/utils/redist-check'; +import redistCheck from '../../../src/utils/redist-check' -let originalPlatform: string; +let originalPlatform: string -type ExecPromiseResult = Promise<{ stdout?: null | string; stderr?: null | string }>; -type ExecFunc = () => ExecPromiseResult; +type ExecPromiseResult = Promise<{ stdout?: null | string; stderr?: null | string }> +type ExecFunc = () => ExecPromiseResult jest.mock('util', () => ({ promisify: jest .fn(() => () => Promise.resolve({ stdout: 'success' })) .mockImplementationOnce(() => () => Promise.resolve({ stdout: 'success' })) .mockImplementationOnce(() => () => Promise.resolve({ stdout: null, stderr: 'err' })) - .mockImplementationOnce(() => () => Promise.reject({ stdout: null, stderr: 'err' })), -})); -jest.mock('utils/logger', () => console); + .mockImplementationOnce(() => () => Promise.reject({ stdout: null, stderr: 'err' })) +})) +jest.mock('utils/logger', () => console) describe('redist check', () => { describe('win32', () => { - beforeAll(function(){ - originalPlatform = process.platform; - Object.defineProperty(process, 'platform', { + beforeAll(function() { + originalPlatform = process.platform + Object.defineProperty(process, 'platform', { value: 'win32' - }); - }); + }) + }) it('true', async () => { const redistStatus = await redistCheck() expect(redistStatus).toBe(true) @@ -33,27 +33,27 @@ describe('redist check', () => { const redistStatus = await redistCheck() expect(redistStatus).toBe(false) }) - afterAll(function(){ - Object.defineProperty(process, 'platform', { + afterAll(function() { + Object.defineProperty(process, 'platform', { value: originalPlatform - }); - }); + }) + }) }) describe('not win32', () => { - beforeAll(function(){ - originalPlatform = process.platform; - Object.defineProperty(process, 'platform', { + beforeAll(function() { + originalPlatform = process.platform + Object.defineProperty(process, 'platform', { value: 'darwin' - }); - }); + }) + }) it('true', async () => { const redistStatus = await redistCheck() expect(redistStatus).toBe(true) }) - afterAll(function(){ - Object.defineProperty(process, 'platform', { + afterAll(function() { + Object.defineProperty(process, 'platform', { value: originalPlatform - }); - }); + }) + }) }) }) diff --git a/yarn.lock b/yarn.lock index a755554ae8..46a3a87990 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20987,10 +20987,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sqlite3@5.0.8: - version "5.0.8" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.0.8.tgz#b4b7eab7156debec80866ef492e01165b4688272" - integrity sha512-f2ACsbSyb2D1qFFcqIXPfFscLtPVOWJr5GmUzYxf4W+0qelu5MWrR+FAQE1d5IUArEltBrzSDxDORG8P/IkqyQ== +sqlite3@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.1.2.tgz#f50d5b1482b6972fb650daf6f718e6507c6cfb0f" + integrity sha512-D0Reg6pRWAFXFUnZKsszCI67tthFD8fGPewRddDCX6w4cYwz3MbvuwRICbL+YQjBAh9zbw+lJ/V9oC8nG5j6eg== dependencies: "@mapbox/node-pre-gyp" "^1.0.0" node-addon-api "^4.2.0"