chore!: Bump avm (#361)

* Bump avm

* Fix lint
This commit is contained in:
Akim 2023-10-17 23:52:30 +07:00 committed by GitHub
parent 2b7756a717
commit 29ec812fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 42 deletions

View File

@ -50,7 +50,7 @@
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"@multiformats/multiaddr": "11.3.0", "@multiformats/multiaddr": "11.3.0",
"@fluencelabs/avm": "0.48.0", "@fluencelabs/avm": "0.52.0",
"hotscript": "1.0.13" "hotscript": "1.0.13"
} }
} }

View File

@ -34,7 +34,7 @@
"dependencies": { "dependencies": {
"@chainsafe/libp2p-noise": "13.0.0", "@chainsafe/libp2p-noise": "13.0.0",
"@chainsafe/libp2p-yamux": "5.0.0", "@chainsafe/libp2p-yamux": "5.0.0",
"@fluencelabs/avm": "0.48.0", "@fluencelabs/avm": "0.52.0",
"@fluencelabs/interfaces": "workspace:*", "@fluencelabs/interfaces": "workspace:*",
"@fluencelabs/marine-worker": "0.3.3", "@fluencelabs/marine-worker": "0.3.3",
"@libp2p/crypto": "2.0.3", "@libp2p/crypto": "2.0.3",

View File

@ -1,33 +0,0 @@
/**
* Copyright 2023 Fluence Labs Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import process from "process";
import { fetchResource as fetchResourceIsomorphic } from "#fetcher";
const isNode =
// process.release is undefined in browser env
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
typeof process !== "undefined" && process.release?.name === "node";
export async function fetchResource(pkg: string, path: string) {
switch (true) {
case isNode:
return fetchResourceIsomorphic(pkg, path);
default:
return fetchResourceIsomorphic(pkg, path);
}
}

View File

@ -29,10 +29,11 @@ import { BlobWorker, Worker } from "threads/master";
import { ClientPeer, makeClientPeerConfig } from "./clientPeer/ClientPeer.js"; import { ClientPeer, makeClientPeerConfig } from "./clientPeer/ClientPeer.js";
import { callAquaFunction } from "./compilerSupport/callFunction.js"; import { callAquaFunction } from "./compilerSupport/callFunction.js";
import { registerService } from "./compilerSupport/registerService.js"; import { registerService } from "./compilerSupport/registerService.js";
import { fetchResource } from "./fetchers/index.js";
import { MarineBackgroundRunner } from "./marine/worker/index.js"; import { MarineBackgroundRunner } from "./marine/worker/index.js";
import { doRegisterNodeUtils } from "./services/NodeUtils.js"; import { doRegisterNodeUtils } from "./services/NodeUtils.js";
import { fetchResource } from "#fetcher";
const isNode = const isNode =
// process.release is undefined in browser env // process.release is undefined in browser env
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition

16
pnpm-lock.yaml generated
View File

@ -188,8 +188,8 @@ importers:
packages/core/interfaces: packages/core/interfaces:
devDependencies: devDependencies:
'@fluencelabs/avm': '@fluencelabs/avm':
specifier: 0.48.0 specifier: 0.52.0
version: 0.48.0 version: 0.52.0
'@multiformats/multiaddr': '@multiformats/multiaddr':
specifier: 11.3.0 specifier: 11.3.0
version: 11.3.0 version: 11.3.0
@ -206,8 +206,8 @@ importers:
specifier: 5.0.0 specifier: 5.0.0
version: 5.0.0 version: 5.0.0
'@fluencelabs/avm': '@fluencelabs/avm':
specifier: 0.48.0 specifier: 0.52.0
version: 0.48.0 version: 0.52.0
'@fluencelabs/interfaces': '@fluencelabs/interfaces':
specifier: workspace:* specifier: workspace:*
version: link:../interfaces version: link:../interfaces
@ -3859,8 +3859,8 @@ packages:
resolution: {integrity: sha512-+JVbWmHeGB+X/BSqmk6/B0gwWJ4bEAxkepVTN8l0mVrJ5zRRmYaCKVplWy6Z3W012m3VVK3A1o3rm/fgfVrQkw==} resolution: {integrity: sha512-+JVbWmHeGB+X/BSqmk6/B0gwWJ4bEAxkepVTN8l0mVrJ5zRRmYaCKVplWy6Z3W012m3VVK3A1o3rm/fgfVrQkw==}
dev: true dev: true
/@fluencelabs/avm@0.48.0: /@fluencelabs/avm@0.52.0:
resolution: {integrity: sha512-9sXyKx2jp8JvmGUIddb7iILq9KN6d1PoCNSvrzIej4yP+pCxpiY9elgeaSoGY5yHcPClNnvHBKcenL23mdUckg==} resolution: {integrity: sha512-T+/Hv/ZPfwWZAC4tH6wEDIRmtN6cTBebqbCaHfaq2PDLSMG0BgssdFF2BAaEXrvOvJbI5Bu/9bQhHv4ga7bYlA==}
/@fluencelabs/cli@0.7.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.6)(@nomicfoundation/hardhat-network-helpers@1.0.8)(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(@typechain/ethers-v5@10.2.1)(@typechain/hardhat@6.1.6)(@types/chai@4.3.5)(@types/mocha@9.1.1)(@types/node@20.7.0)(chai@4.3.10)(hardhat-gas-reporter@1.0.9)(hardhat@2.15.0)(solidity-coverage@0.7.22)(ts-node@10.9.1)(typechain@8.2.0)(typescript@5.1.6): /@fluencelabs/cli@0.7.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.6)(@nomicfoundation/hardhat-network-helpers@1.0.8)(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(@typechain/ethers-v5@10.2.1)(@typechain/hardhat@6.1.6)(@types/chai@4.3.5)(@types/mocha@9.1.1)(@types/node@20.7.0)(chai@4.3.10)(hardhat-gas-reporter@1.0.9)(hardhat@2.15.0)(solidity-coverage@0.7.22)(ts-node@10.9.1)(typechain@8.2.0)(typescript@5.1.6):
resolution: {integrity: sha512-cXhlXBxNh1i66Twb3Nhpm1mXHpa+8zzoQ5wKJ6zJjOtrw6GWB6WrfIAb+aaLGWJMBnWHcZEkXs5vx9vwvVplcQ==} resolution: {integrity: sha512-cXhlXBxNh1i66Twb3Nhpm1mXHpa+8zzoQ5wKJ6zJjOtrw6GWB6WrfIAb+aaLGWJMBnWHcZEkXs5vx9vwvVplcQ==}
@ -4452,6 +4452,8 @@ packages:
protons-runtime: 5.0.2(uint8arraylist@2.4.3) protons-runtime: 5.0.2(uint8arraylist@2.4.3)
uint8arraylist: 2.4.3 uint8arraylist: 2.4.3
uint8arrays: 4.0.6 uint8arrays: 4.0.6
transitivePeerDependencies:
- supports-color
/@libp2p/interface-connection@4.0.0: /@libp2p/interface-connection@4.0.0:
resolution: {integrity: sha512-6xx/NmEc84HX7QmsjSC3hHredQYjHv4Dkf4G27adAPf+qN+vnPxmQ7gaTnk243a0++DOFTbZ2gKX/15G2B6SRg==} resolution: {integrity: sha512-6xx/NmEc84HX7QmsjSC3hHredQYjHv4Dkf4G27adAPf+qN+vnPxmQ7gaTnk243a0++DOFTbZ2gKX/15G2B6SRg==}
@ -4621,6 +4623,8 @@ packages:
protons-runtime: 5.0.2(uint8arraylist@2.4.3) protons-runtime: 5.0.2(uint8arraylist@2.4.3)
uint8arraylist: 2.4.3 uint8arraylist: 2.4.3
uint8arrays: 4.0.6 uint8arrays: 4.0.6
transitivePeerDependencies:
- supports-color
/@libp2p/peer-id@2.0.1: /@libp2p/peer-id@2.0.1:
resolution: {integrity: sha512-uGIR4rS+j+IzzIu0kih4MonZEfRmjGNfXaSPMIFOeMxZItZT6TIpxoVNYxHl4YtneSFKzlLnf9yx9EhRcyfy8Q==} resolution: {integrity: sha512-uGIR4rS+j+IzzIu0kih4MonZEfRmjGNfXaSPMIFOeMxZItZT6TIpxoVNYxHl4YtneSFKzlLnf9yx9EhRcyfy8Q==}