diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml new file mode 100644 index 00000000000..ac412a7dd4a --- /dev/null +++ b/.github/actions/install-playwright/action.yml @@ -0,0 +1,24 @@ +name: Install Playwright +description: Installs Playwright and its dependencies and caches them. + +runs: + using: composite + steps: + - name: Query playwright version + shell: bash + run: echo "PLAYWRIGHT_VERSION=$(yarn workspace @noir-lang/noirc_abi info @web/test-runner-playwright --json | jq .children.Version | tr -d '"')" >> $GITHUB_ENV + + - name: Cache playwright binaries + uses: actions/cache@v3 + id: playwright-cache + with: + path: | + ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} + + - name: Install playwright deps + shell: bash + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: | + npx playwright install + npx playwright install-deps diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 36c8f1bccb2..5efe115ddcf 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,17 +1,9 @@ -name: Setup - -inputs: - working-directory: - default: ./ - required: false +name: Install Yarn dependencies +description: Installs the workspace's yarn dependencies and caches them runs: using: composite steps: - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 18.17.1 - name: Cache uses: actions/cache@v3 id: cache @@ -19,8 +11,6 @@ runs: path: "**/node_modules" key: yarn-v1-${{ hashFiles('**/yarn.lock') }} - name: Install - run: | - cd ${{ inputs.working-directory }} - yarn --immutable + run: yarn --immutable shell: bash if: steps.cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/abi_wasm.yml b/.github/workflows/abi_wasm.yml index c957a59941f..8f219a77977 100644 --- a/.github/workflows/abi_wasm.yml +++ b/.github/workflows/abi_wasm.yml @@ -13,7 +13,7 @@ concurrency: cancel-in-progress: true jobs: - noirc-abi-wasm-build: + build: runs-on: ubuntu-latest env: CACHED_PATH: /tmp/nix-cache @@ -72,35 +72,29 @@ jobs: path: ${{ env.UPLOAD_PATH }} retention-days: 10 - - name: Install workspace dependencies - run: | - yarn install --immutable - - - name: Run node tests - run: | - yarn workspace @noir-lang/noirc_abi test + test: + runs-on: ubuntu-latest + needs: [build] + + steps: + - name: Checkout sources + uses: actions/checkout@v3 - - name: Cache playwright binaries - uses: actions/cache@v3 - id: playwright-cache + - name: Download wasm package artifact + uses: actions/download-artifact@v3 with: - path: | - ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} + name: noirc_abi_wasm + path: ./tooling/noirc_abi_wasm + + - name: Install Yarn dependencies + uses: ./.github/actions/setup - - name: Query playwright version - working-directory: ./tooling/noirc_abi_wasm - run: echo "PLAYWRIGHT_VERSION=$(yarn info @web/test-runner-playwright --json | jq .children.Version)" >> $GITHUB_ENV + - name: Run node tests + run: yarn workspace @noir-lang/noirc_abi test - - name: Install playwright deps - if: steps.playwright-cache.outputs.cache-hit != 'true' - working-directory: ./tooling/noirc_abi_wasm - run: | - npx playwright install - npx playwright install-deps + - name: Install Playwright + uses: ./.github/actions/install-playwright - name: Run browser tests - working-directory: ./tooling/noirc_abi_wasm - run: | - yarn workspace @noir-lang/noirc_abi test:browser + run: yarn workspace @noir-lang/noirc_abi test:browser diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 8d29886e40c..bdc95b40bd5 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -17,7 +17,9 @@ jobs: name: cargo clippy runs-on: ${{ matrix.runner }} timeout-minutes: 30 - + env: + RUSTFLAGS: -Dwarnings + strategy: fail-fast: false matrix: @@ -30,9 +32,8 @@ jobs: uses: actions/checkout@v4 - name: Setup toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@1.66.0 with: - toolchain: stable # We do not use MSRV so we can benefit from newer lints targets: ${{ matrix.target }} components: clippy, rustfmt diff --git a/.github/workflows/noir-js.yml b/.github/workflows/noir-js.yml new file mode 100644 index 00000000000..e8b210feb06 --- /dev/null +++ b/.github/workflows/noir-js.yml @@ -0,0 +1,52 @@ +name: Release and Publish Noir Js + +on: + workflow_dispatch: + +jobs: + release-noir-js: + name: Release and Publish Noir Js + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: yarn install --immutable + + - name: Install jq + run: sudo apt-get install jq + + - name: Install cargo and wasm-bindgen + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env + cargo install -f wasm-bindgen-cli --version 0.2.86 + + - name: Install toml2json + run: | + source $HOME/.cargo/env + cargo install toml2json + + - name: Install wasm-opt + run: | + npm i wasm-opt -g + + - name: Install wasm32-unknown-unknwown target + run: | + rustup target add wasm32-unknown-unknown + + - name: Build noirc_abi + run: yarn workspace @noir-lang/noirc_abi build + + - name: Build noir_js + run: yarn workspace @noir-lang/noir_js build + + - name: Authenticate with npm + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + + - name: Publish to NPM + working-directory: ./tooling/noir_js + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish-abi_wasm.yml b/.github/workflows/publish-abi_wasm.yml index ff0ea7f0cc7..3ca7b77f747 100644 --- a/.github/workflows/publish-abi_wasm.yml +++ b/.github/workflows/publish-abi_wasm.yml @@ -1,10 +1,11 @@ name: Publish ABI Wasm on: - push: - tags: - - "*" workflow_dispatch: + inputs: + noir-ref: + description: The noir reference to checkout + required: true jobs: noirc-abi-wasm-build: @@ -15,6 +16,9 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + repository: "noir-lang/noir" + ref: ${{ inputs.noir-ref }} - name: Setup Node.js uses: actions/setup-node@v3 @@ -39,8 +43,9 @@ jobs: mkdir temp_publish_dir cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ - - name: Publish to NPM + - name: Publish to npm working-directory: ./temp_publish_dir - run: npm publish + run: | + npm publish --tag latest env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7c3b23941ed..f39f35775f7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -74,11 +74,14 @@ jobs: path: ./dist/* retention-days: 3 + - name: Install Yarn dependencies + if: matrix.target == 'x86_64-apple-darwin' + uses: ./.github/actions/setup + - name: Test built artifact if: matrix.target == 'x86_64-apple-darwin' run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ - yarn install --immutable yarn workspace release-tests test - name: Upload binaries to release tag @@ -139,11 +142,14 @@ jobs: path: ./dist/* retention-days: 3 + - name: Install Yarn dependencies + if: startsWith(matrix.target, 'x86_64-unknown-linux') + uses: ./.github/actions/setup + - name: Test built artifact if: startsWith(matrix.target, 'x86_64-unknown-linux') run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ - yarn install --immutable yarn workspace release-tests test - name: Upload binaries to release tag diff --git a/.github/workflows/release-noir-wasm.yml b/.github/workflows/release-noir-wasm.yml new file mode 100644 index 00000000000..d862ad6993a --- /dev/null +++ b/.github/workflows/release-noir-wasm.yml @@ -0,0 +1,43 @@ +name: Release Noir Wasm + +on: + workflow_dispatch: + +jobs: + publish-noir-wasm: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - uses: cachix/install-nix-action@v22 + with: + nix_path: nixpkgs=channel:nixos-23.05 + + - name: Build with Nix + run: | + nix build -L .#wasm + + - name: Copy output + run: | + cp -r $(readlink result)/* . + + - name: Authenticate with npm + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + + - name: Publish to npm + run: | + npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-source-resolver.yml b/.github/workflows/release-source-resolver.yml index 9a1a3381dd8..aad9ec9618c 100644 --- a/.github/workflows/release-source-resolver.yml +++ b/.github/workflows/release-source-resolver.yml @@ -2,10 +2,6 @@ name: Release and Publish Source Resolver on: workflow_dispatch: - inputs: - version: - description: "Version number" - required: false jobs: release-source-resolver: @@ -15,39 +11,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Bump version - working-directory: ./compiler/source-resolver - id: bump_version - run: | - if [ -z "${{ github.event.inputs.version }}" ]; then - NEW_VERSION=$(npm version patch --no-git-tag-version) - else - NEW_VERSION=$(npm version ${{ github.event.inputs.version }} --no-git-tag-version) - fi - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - - name: Install dependencies - working-directory: ./compiler/source-resolver - run: npm install + run: yarn install --immutable - name: Build noir-source-resolver - working-directory: ./compiler/source-resolver - run: npm run build + run: yarn workspace @noir-lang/source-resolver build - name: Publish to NPM working-directory: ./compiler/source-resolver run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - - - name: Configure git - run: | - git config user.name kevaundray - git config user.email kevtheappdev@gmail.com - - - name: Commit updates - run: | - git add compiler/source-resolver/package-lock.json - git add compiler/source-resolver/package.json - git commit -m "chore: Update source-resolver to ${{ env.NEW_VERSION }}" - git push + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb030f41f82..5842e041285 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,8 +74,46 @@ jobs: - name: Dispatch to noir_wasm uses: benc-uk/workflow-dispatch@v1 with: - workflow: update.yml - repo: noir-lang/noir_wasm + workflow: release-noir-wasm.yml ref: master token: ${{ secrets.NOIR_REPO_TOKEN }} + + publish-noir-js: + name: Publish noir_js package + needs: [release-please] + if: ${{ needs.release-please.outputs.tag-name }} + runs-on: ubuntu-latest + steps: + - name: Dispatch to noir_wasm + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: noir-js.yml + ref: master + token: ${{ secrets.NOIR_REPO_TOKEN }} + + publish-source-resolver: + name: Publish source resolver package + needs: [release-please] + if: ${{ needs.release-please.outputs.tag-name }} + runs-on: ubuntu-latest + steps: + - name: Dispatch to source resolver + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: release-source-resolver.yml + ref: master + token: ${{ secrets.NOIR_REPO_TOKEN }} + + dispatch-publish-abi-wasm: + name: Dispatch to publish-abi_wasm workflow + needs: [release-please] + if: ${{ needs.release-please.outputs.tag-name }} + runs-on: ubuntu-latest + steps: + - name: Trigger publish-abi_wasm.yml workflow + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: publish-abi_wasm.yml + repo: ${{ github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}" }' diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 4a941a89105..736429a37d2 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -77,9 +77,15 @@ jobs: path: ${{ env.UPLOAD_PATH }} retention-days: 3 + - name: Install Yarn dependencies + uses: ./.github/actions/setup + + - name: Setup `integration-tests` + run: | + yarn workspace @noir-lang/noir-source-resolver build + - name: Run `integration-tests` run: | - yarn install --immutable yarn test:integration - name: Alert on nightly test failure diff --git a/.github/workflows/test-source-resolver.yml b/.github/workflows/test-source-resolver.yml index 87ffc96e866..5dafe4c5fd9 100644 --- a/.github/workflows/test-source-resolver.yml +++ b/.github/workflows/test-source-resolver.yml @@ -16,11 +16,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Install dependencies - run: yarn install --immutable + - name: Install Yarn dependencies + uses: ./.github/actions/setup - - name: Build noir-source-resolver - run: yarn workspace @noir-lang/noir-source-resolver build + - name: Build @noir-lang/source-resolver + run: yarn workspace @noir-lang/source-resolver build - name: Run tests - run: yarn workspace @noir-lang/noir-source-resolver test + run: yarn workspace @noir-lang/source-resolver test diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 89d790cb00e..f7b36738482 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -132,16 +132,20 @@ jobs: chmod +x $nargo_binary $nargo_binary compile + - name: Install Yarn dependencies + uses: ./.github/actions/setup + + - name: Install Playwright + uses: ./.github/actions/install-playwright + - name: Install dependencies run: | - npx playwright install - npx playwright install-deps cp -r ./compiler/wasm/downloaded/nodejs ./compiler/wasm cp -r ./compiler/wasm/downloaded/web ./compiler/wasm - yarn install --immutable - yarn workspace @noir-lang/noir-source-resolver build + yarn workspace @noir-lang/source-resolver build - - name: Run tests - run: | - yarn workspace @noir-lang/noir_wasm test:browser - yarn workspace @noir-lang/noir_wasm test:node + - name: Run node tests + run: yarn workspace @noir-lang/noir_wasm test:node + + - name: Run browser tests + run: yarn workspace @noir-lang/noir_wasm test:browser diff --git a/.gitignore b/.gitignore index a4111fad7c0..e36a7458e7b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ compiler/source-resolver/node_modules compiler/source-resolver/lib compiler/source-resolver/lib-node +# Noir.js +tooling/noir_js/lib + # Nix stuff **/outputs result diff --git a/Cargo.lock b/Cargo.lock index 8e05b6a767c..232d8b6eff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2281,7 +2281,6 @@ dependencies = [ "build-data", "console_error_panic_hook", "fm", - "getrandom", "gloo-utils", "log", "nargo", @@ -2316,7 +2315,6 @@ dependencies = [ "acvm", "build-data", "console_error_panic_hook", - "getrandom", "gloo-utils", "iter-extended", "js-sys", diff --git a/compiler/fm/src/file_reader.rs b/compiler/fm/src/file_reader.rs index 1a9b31ed949..887d0b12f88 100644 --- a/compiler/fm/src/file_reader.rs +++ b/compiler/fm/src/file_reader.rs @@ -25,7 +25,7 @@ cfg_if::cfg_if! { if #[cfg(target_arch = "wasm32")] { use wasm_bindgen::{prelude::*, JsValue}; - #[wasm_bindgen(module = "@noir-lang/noir-source-resolver")] + #[wasm_bindgen(module = "@noir-lang/source-resolver")] extern "C" { #[wasm_bindgen(catch)] diff --git a/compiler/integration-tests/package.json b/compiler/integration-tests/package.json index 173cd9ef87d..451439b5cc2 100644 --- a/compiler/integration-tests/package.json +++ b/compiler/integration-tests/package.json @@ -13,12 +13,13 @@ "dependencies": { "@aztec/bb.js": "^0.5.1", "@noir-lang/acvm_js": "^0.26.1", - "@noir-lang/noir-source-resolver": "workspace:*", "@noir-lang/noir_wasm": "workspace:*", "@noir-lang/noirc_abi": "workspace:*", + "@noir-lang/source-resolver": "workspace:*", "@web/dev-server-esbuild": "^0.3.6", "@web/test-runner": "^0.15.3", - "@web/test-runner-playwright": "^0.10.0", - "@web/test-runner-webdriver": "^0.7.0" + "@web/test-runner-webdriver": "^0.7.0", + "fflate": "^0.8.0", + "smol-toml": "^1.1.2" } } diff --git a/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts b/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts index e48a75acb51..e2a88e331d0 100644 --- a/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts +++ b/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts @@ -1,5 +1,5 @@ import { expect } from '@esm-bundle/chai'; -import { initialiseResolver } from "@noir-lang/noir-source-resolver"; +import { initializeResolver } from "@noir-lang/source-resolver"; import newCompiler, { compile, init_log_level as compilerLogLevel @@ -66,7 +66,7 @@ test_cases.forEach((testInfo) => { expect(noir_source).to.be.a.string; - initialiseResolver((id: String) => { + initializeResolver((id: String) => { console.log("Resolving:", id); return noir_source; }); diff --git a/compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs b/compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs index a2943596a53..1a58386c139 100644 --- a/compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs +++ b/compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs @@ -556,14 +556,13 @@ impl Context { let predicate_index = self.acir_context.mul_var(index_var, self.current_side_effects_enabled_var)?; let new_value = if let Some(store) = store_value { - let store_var = Some(self.convert_value(store, dfg).into_var()?); + let store_var = self.convert_value(store, dfg).into_var()?; if self.acir_context.is_constant_one(&self.current_side_effects_enabled_var) { - store_var + Some(store_var) } else { let dummy = self.array_get(instruction, array, predicate_index, dfg)?; - let true_pred = self - .acir_context - .mul_var(store_var.unwrap(), self.current_side_effects_enabled_var)?; + let true_pred = + self.acir_context.mul_var(store_var, self.current_side_effects_enabled_var)?; let one = self.acir_context.add_constant(FieldElement::one()); let not_pred = self.acir_context.sub_var(one, self.current_side_effects_enabled_var)?; diff --git a/compiler/noirc_evaluator/src/ssa/ir/map.rs b/compiler/noirc_evaluator/src/ssa/ir/map.rs index 10d6adfbd6a..b6055973f1c 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/map.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/map.rs @@ -52,7 +52,7 @@ impl std::hash::Hash for Id { impl PartialOrd for Id { fn partial_cmp(&self, other: &Self) -> Option { - self.index.partial_cmp(&other.index) + Some(self.cmp(other)) } } diff --git a/compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs b/compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs index 9eda52e0475..e71e23d2032 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs @@ -125,7 +125,7 @@ impl Context { fn resolve_instruction( instruction_id: InstructionId, dfg: &DataFlowGraph, - constrained_values: &mut HashMap, + constrained_values: &HashMap, ) -> Instruction { let instruction = dfg[instruction_id].clone(); diff --git a/compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs b/compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs index 652869bdc9d..20250f5470e 100644 --- a/compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs +++ b/compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs @@ -527,9 +527,7 @@ impl<'a> FunctionContext<'a> { ) -> Values { match expr { // If we're constraining an equality to be true then constrain the two sides directly. - Expression::Binary(Binary { lhs, operator, rhs, .. }) - if operator == &BinaryOpKind::Equal => - { + Expression::Binary(Binary { lhs, operator: BinaryOpKind::Equal, rhs, .. }) => { let lhs = self.codegen_non_tuple_expression(lhs); let rhs = self.codegen_non_tuple_expression(rhs); self.builder.set_location(location).insert_constrain(lhs, rhs, assert_message); diff --git a/compiler/noirc_frontend/src/ast/statement.rs b/compiler/noirc_frontend/src/ast/statement.rs index 51afa688082..3d9ab1e6ec4 100644 --- a/compiler/noirc_frontend/src/ast/statement.rs +++ b/compiler/noirc_frontend/src/ast/statement.rs @@ -125,7 +125,7 @@ impl PartialEq for Ident { impl PartialOrd for Ident { fn partial_cmp(&self, other: &Self) -> Option { - self.0.contents.partial_cmp(&other.0.contents) + Some(self.cmp(other)) } } diff --git a/compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs b/compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs index c55335e4443..11321d673a7 100644 --- a/compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs +++ b/compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs @@ -530,13 +530,13 @@ fn take_errors_filter_self_not_resolved(resolver: Resolver<'_>) -> Vec { &ident.0.contents != "Self" } _ => true, }) + .cloned() .collect() } diff --git a/compiler/noirc_frontend/src/hir/def_collector/dc_mod.rs b/compiler/noirc_frontend/src/hir/def_collector/dc_mod.rs index 2679059cebd..813c222319e 100644 --- a/compiler/noirc_frontend/src/hir/def_collector/dc_mod.rs +++ b/compiler/noirc_frontend/src/hir/def_collector/dc_mod.rs @@ -470,7 +470,7 @@ impl<'a> ModCollector<'a> { }; // Parse the AST for the module we just found and then recursively look for it's defs - let ast = parse_file(&mut context.file_manager, child_file_id, errors); + let ast = parse_file(&context.file_manager, child_file_id, errors); // Add module into def collector and get a ModuleId if let Some(child_mod_id) = diff --git a/compiler/noirc_frontend/src/hir/def_map/mod.rs b/compiler/noirc_frontend/src/hir/def_map/mod.rs index 1a7c6674e01..76db8ca753c 100644 --- a/compiler/noirc_frontend/src/hir/def_map/mod.rs +++ b/compiler/noirc_frontend/src/hir/def_map/mod.rs @@ -86,7 +86,7 @@ impl CrateDefMap { // First parse the root file. let root_file_id = context.crate_graph[crate_id].root_file_id; - let ast = parse_file(&mut context.file_manager, root_file_id, errors); + let ast = parse_file(&context.file_manager, root_file_id, errors); #[cfg(feature = "aztec")] let ast = aztec_library::transform(ast, &crate_id, context, errors); @@ -160,15 +160,15 @@ impl CrateDefMap { .iter() .filter_map(|(id, module)| { if module.is_contract { - let function_ids: Vec = - module.value_definitions().filter_map(|id| id.as_function()).collect(); - - let functions = function_ids - .into_iter() - .map(|id| { - let is_entry_point = - !interner.function_attributes(&id).has_contract_library_method(); - ContractFunctionMeta { function_id: id, is_entry_point } + let functions = module + .value_definitions() + .filter_map(|id| { + id.as_function().map(|function_id| { + let is_entry_point = !interner + .function_attributes(&function_id) + .has_contract_library_method(); + ContractFunctionMeta { function_id, is_entry_point } + }) }) .collect(); @@ -237,7 +237,7 @@ pub struct Contract { /// Given a FileId, fetch the File, from the FileManager and parse it's content pub fn parse_file( - fm: &mut FileManager, + fm: &FileManager, file_id: FileId, all_errors: &mut Vec, ) -> ParsedModule { diff --git a/compiler/noirc_frontend/src/hir/type_check/mod.rs b/compiler/noirc_frontend/src/hir/type_check/mod.rs index ea1793b7e76..d690fe2458a 100644 --- a/compiler/noirc_frontend/src/hir/type_check/mod.rs +++ b/compiler/noirc_frontend/src/hir/type_check/mod.rs @@ -90,10 +90,7 @@ pub fn type_check_func(interner: &mut NodeInterner, func_id: FuncId) -> Vec (noirc_errors::Span, bool) { +fn function_info(interner: &NodeInterner, function_body_id: &ExprId) -> (noirc_errors::Span, bool) { let (expr_span, empty_function) = if let HirExpression::Block(block) = interner.expression(function_body_id) { let last_stmt = block.statements().last(); @@ -335,7 +332,14 @@ mod test { "#; - type_check_src_code(src, vec![String::from("main"), String::from("foo")]); + // expect a deprecation warning since we are changing for-loop default type. + // There is a deprecation warning per for-loop. + let expected_num_errors = 2; + type_check_src_code_errors_expected( + src, + expected_num_errors, + vec![String::from("main"), String::from("foo")], + ); } #[test] fn basic_closure() { @@ -392,15 +396,28 @@ mod test { } } + fn type_check_src_code(src: &str, func_namespace: Vec) { + type_check_src_code_errors_expected(src, 0, func_namespace); + } + // This function assumes that there is only one function and this is the // func id that is returned - fn type_check_src_code(src: &str, func_namespace: Vec) { + fn type_check_src_code_errors_expected( + src: &str, + expected_number_errors: usize, + func_namespace: Vec, + ) { let (program, errors) = parse_program(src); let mut interner = NodeInterner::default(); - // Using assert_eq here instead of assert(errors.is_empty()) displays - // the whole vec if the assert fails rather than just two booleans - assert_eq!(errors, vec![]); + assert_eq!( + errors.len(), + expected_number_errors, + "expected {} errors, but got {}, errors: {:?}", + expected_number_errors, + errors.len(), + errors + ); let main_id = interner.push_fn(HirFunction::empty()); interner.push_function_definition("main".into(), main_id); diff --git a/compiler/noirc_frontend/src/node_interner.rs b/compiler/noirc_frontend/src/node_interner.rs index cffa5e92e3f..e0e404b48d8 100644 --- a/compiler/noirc_frontend/src/node_interner.rs +++ b/compiler/noirc_frontend/src/node_interner.rs @@ -549,7 +549,7 @@ impl NodeInterner { } pub fn function_attributes(&self, func_id: &FuncId) -> Attributes { - self.function_meta(func_id).attributes.clone() + self.function_meta(func_id).attributes } /// Returns the interned statement corresponding to `stmt_id` diff --git a/compiler/noirc_frontend/src/parser/errors.rs b/compiler/noirc_frontend/src/parser/errors.rs index 45832ce39db..830e0258766 100644 --- a/compiler/noirc_frontend/src/parser/errors.rs +++ b/compiler/noirc_frontend/src/parser/errors.rs @@ -27,6 +27,8 @@ pub enum ParserErrorReason { PatternInTraitFunctionParameter, #[error("comptime keyword is deprecated")] ComptimeDeprecated, + #[error("the default type of a for-loop range will be changing from a Field to a u64")] + ForLoopDefaultTypeChanging, #[error("{0} are experimental and aren't fully supported yet")] ExperimentalFeature(&'static str), #[error("Where clauses are allowed only on functions with generic parameters")] @@ -132,6 +134,11 @@ impl From for Diagnostic { "The 'comptime' keyword has been deprecated. It can be removed without affecting your program".into(), error.span, ), + ParserErrorReason::ForLoopDefaultTypeChanging => Diagnostic::simple_warning( + "The default type for the incrementor in a for-loop will be changed.".into(), + "The default type in a for-loop will be changing from Field to u64".into(), + error.span, + ), ParserErrorReason::ExperimentalFeature(_) => Diagnostic::simple_warning( reason.to_string(), "".into(), diff --git a/compiler/noirc_frontend/src/parser/parser.rs b/compiler/noirc_frontend/src/parser/parser.rs index 34aa0ccb072..227aac8030e 100644 --- a/compiler/noirc_frontend/src/parser/parser.rs +++ b/compiler/noirc_frontend/src/parser/parser.rs @@ -1384,6 +1384,10 @@ where .then(expr_no_constructors.clone()) .map(|(start, end)| ForRange::Range(start, end)) .or(expr_no_constructors.map(ForRange::Array)) + .validate(|expr, span, emit| { + emit(ParserError::with_reason(ParserErrorReason::ForLoopDefaultTypeChanging, span)); + expr + }) } fn array_expr

(expr_parser: P) -> impl NoirParser diff --git a/compiler/source-resolver/package.json b/compiler/source-resolver/package.json index 380125ecdbb..76ce4657c10 100644 --- a/compiler/source-resolver/package.json +++ b/compiler/source-resolver/package.json @@ -1,5 +1,5 @@ { - "name": "@noir-lang/noir-source-resolver", + "name": "@noir-lang/source-resolver", "version": "1.1.4", "license": "MIT", "main": "./lib-node/index_node.js", diff --git a/compiler/source-resolver/src/index.ts b/compiler/source-resolver/src/index.ts index a83b6b03728..7d8e254f7db 100644 --- a/compiler/source-resolver/src/index.ts +++ b/compiler/source-resolver/src/index.ts @@ -9,15 +9,15 @@ export let read_file = function (source_id: any): string { if (typeof result === "string") { return result; } else { - throw new Error("Noir source resolver funtion MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?"); + throw new Error("Noir source resolver function MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?"); } } else { - throw new Error('Not yet initialised. Use initialiseResolver(() => string)'); + throw new Error('Not yet initialized. Use initializeResolver(() => string)'); } }; -function initialise(noir_resolver: (source_id: String) => string): (source_id: String) => string { +function initialize(noir_resolver: (source_id: String) => string): (source_id: String) => string { if (typeof noir_resolver === "function") { return noir_resolver; @@ -26,6 +26,6 @@ function initialise(noir_resolver: (source_id: String) => string): (source_id: S } } -export function initialiseResolver(resolver: (source_id: String) => string): void { - resolveFunction = initialise(resolver); +export function initializeResolver(resolver: (source_id: String) => string): void { + resolveFunction = initialize(resolver); } \ No newline at end of file diff --git a/compiler/source-resolver/src/index_node.ts b/compiler/source-resolver/src/index_node.ts index faa0d3efcdb..396af74c058 100644 --- a/compiler/source-resolver/src/index_node.ts +++ b/compiler/source-resolver/src/index_node.ts @@ -1,8 +1,8 @@ /// -import { initialiseResolver, read_file } from './index.js'; +import { initializeResolver, read_file } from './index.js'; -initialiseResolver((source_id: String) => { +initializeResolver((source_id: String) => { let fileContent = ""; try { const fs = require("fs"); @@ -15,6 +15,6 @@ initialiseResolver((source_id: String) => { return fileContent; }); -export { initialiseResolver, read_file }; +export { initializeResolver, read_file }; diff --git a/compiler/source-resolver/test/cjs_initialization.test.cjs b/compiler/source-resolver/test/cjs_initialization.test.cjs index d83f5b1b7cb..1dc7784fa40 100644 --- a/compiler/source-resolver/test/cjs_initialization.test.cjs +++ b/compiler/source-resolver/test/cjs_initialization.test.cjs @@ -1,6 +1,6 @@ const test = require('ava'); -const { initialiseResolver, read_file } = require("../lib-node/index_node.js"); +const { initializeResolver, read_file } = require("../lib-node/index_node.js"); test('It reads file from file system within read_file using default implementation.', t => { @@ -14,7 +14,7 @@ test('It calls function from initializer within read_file function.', t => { const RESULT_RESPONSE = "TEST"; - initialiseResolver((source) => { + initializeResolver((source) => { return source; }); @@ -28,7 +28,7 @@ test('It communicates error when resolver returns non-String to read_file functi const RESULT_RESPONSE = "TEST"; - initialiseResolver((source) => { + initializeResolver((source) => { return Promise.resolve(source); }); @@ -36,14 +36,14 @@ test('It communicates error when resolver returns non-String to read_file functi read_file(RESULT_RESPONSE); }, { instanceOf: Error }); - t.is(error.message, 'Noir source resolver funtion MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?'); + t.is(error.message, 'Noir source resolver function MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?'); }); test('It communicates error when resolver is initialized to anything but a function.', t => { const error = t.throws(() => { - initialiseResolver(null); + initializeResolver(null); }, { instanceOf: Error }); t.is(error.message, 'Provided Noir Resolver is not a function, hint: use function(module_id) => NoirSource as second parameter'); diff --git a/compiler/source-resolver/test/esm_initialization.test.mjs b/compiler/source-resolver/test/esm_initialization.test.mjs index 30f77dcf7a0..197b48e48d0 100644 --- a/compiler/source-resolver/test/esm_initialization.test.mjs +++ b/compiler/source-resolver/test/esm_initialization.test.mjs @@ -5,15 +5,15 @@ */ import test from 'ava'; -import { initialiseResolver, read_file } from "../lib-node/index.js"; +import { initializeResolver, read_file } from "../lib-node/index.js"; -test('It communicates error when read_file was called before initialiseResolver.', t => { +test('It communicates error when read_file was called before initializeResolver.', t => { const error = t.throws(() => { const readResult = read_file("./package.json"); }, { instanceOf: Error }); - t.is(error.message, 'Not yet initialised. Use initialiseResolver(() => string)'); + t.is(error.message, 'Not yet initialized. Use initializeResolver(() => string)'); }); @@ -21,7 +21,7 @@ test('It calls function from initializer within read_file function.', t => { const RESULT_RESPONSE = "TEST"; - initialiseResolver((source) => { + initializeResolver((source) => { return source; }); @@ -35,7 +35,7 @@ test('It communicates error when resolver returns non-String to read_file functi const RESULT_RESPONSE = "TEST"; - initialiseResolver((source) => { + initializeResolver((source) => { return Promise.resolve(source); }); @@ -43,14 +43,14 @@ test('It communicates error when resolver returns non-String to read_file functi read_file(RESULT_RESPONSE); }, { instanceOf: Error }); - t.is(error.message, 'Noir source resolver funtion MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?'); + t.is(error.message, 'Noir source resolver function MUST return String synchronously. Are you trying to return anything else, eg. `Promise`?'); }); test('It communicates error when resolver is initialized to anything but a function.', t => { const error = t.throws(() => { - initialiseResolver(null); + initializeResolver(null); }, { instanceOf: Error }); t.is(error.message, 'Provided Noir Resolver is not a function, hint: use function(module_id) => NoirSource as second parameter'); diff --git a/compiler/source-resolver/types/index.d.ts b/compiler/source-resolver/types/index.d.ts index 14f4c17445b..22d9a98fa1f 100644 --- a/compiler/source-resolver/types/index.d.ts +++ b/compiler/source-resolver/types/index.d.ts @@ -1,2 +1,2 @@ export declare let read_file: (source_id: any) => string; -export declare function initialiseResolver(resolver: (source_id: String) => string): void; +export declare function initializeResolver(resolver: (source_id: String) => string): void; diff --git a/compiler/source-resolver/types/index_node.d.ts b/compiler/source-resolver/types/index_node.d.ts index 75e87c00efb..3a109e47e73 100644 --- a/compiler/source-resolver/types/index_node.d.ts +++ b/compiler/source-resolver/types/index_node.d.ts @@ -1,2 +1,2 @@ -import { initialiseResolver, read_file } from './index.js'; -export { initialiseResolver, read_file }; +import { initializeResolver, read_file } from './index.js'; +export { initializeResolver, read_file }; diff --git a/compiler/wasm/.gitignore b/compiler/wasm/.gitignore index 37b89b7a2ab..f968dafbcc3 100644 --- a/compiler/wasm/.gitignore +++ b/compiler/wasm/.gitignore @@ -1,8 +1 @@ -# Yarn -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions +noir-script/target diff --git a/compiler/wasm/Cargo.toml b/compiler/wasm/Cargo.toml index 4514a6eaf0d..4fee0053296 100644 --- a/compiler/wasm/Cargo.toml +++ b/compiler/wasm/Cargo.toml @@ -26,9 +26,5 @@ gloo-utils = { version = "0.1", features = ["serde"] } log = "0.4.17" wasm-logger = "0.2.0" -# This is an unused dependency, we are adding it -# so that we can enable the js feature in getrandom. -getrandom = { version = "*", features = ["js"] } - [build-dependencies] build-data = "0.1.3" diff --git a/compiler/wasm/build.sh b/compiler/wasm/build.sh index 22acdd06cba..8157e42c6de 100755 --- a/compiler/wasm/build.sh +++ b/compiler/wasm/build.sh @@ -38,7 +38,7 @@ rm -rf $self_path/result >/dev/null 2>&1 if [ -v out ]; then echo "Will install package to $out (defined outside installPhase.sh script)" else - out="$self_path/outputs/out" + export out="$self_path/outputs/out" echo "Will install package to $out" fi diff --git a/compiler/wasm/installPhase.sh b/compiler/wasm/installPhase.sh index 17c86dac4d8..a71b3f8cd0e 100755 --- a/compiler/wasm/installPhase.sh +++ b/compiler/wasm/installPhase.sh @@ -3,10 +3,6 @@ export self_path=$(dirname "$(readlink -f "$0")") mkdir -p $out cp $self_path/README.md $out/ +cp $self_path/package.json $out/ cp -r $self_path/nodejs $out/ cp -r $self_path/web $out/ - -# The main package.json contains several keys which are incorrect/unwanted when distributing. -cat $self_path/package.json \ -| jq 'del(.private, .devDependencies, .scripts, .packageManager)' \ -> $out/package.json diff --git a/compiler/wasm/noir-script/target/noir_wasm_testing.json b/compiler/wasm/noir-script/target/noir_wasm_testing.json deleted file mode 100644 index fdf25a4743d..00000000000 --- a/compiler/wasm/noir-script/target/noir_wasm_testing.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"integer","sign":"unsigned","width":64},"visibility":"private"},{"name":"y","type":{"kind":"integer","sign":"unsigned","width":64},"visibility":"public"}],"param_witnesses":{"x":[1],"y":[2]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/81WXW7DIAw20BJl0noWE6CBt6k3WbT0/kfYooJm0bQPxZZqKXKw4PPPB5Y/AOATbqL+Pl30F1nrsqaiiq52j+cQ1nlanXffOOUlRQxxOSeXXEzxZ0rerymkOS95xuyCX901Zn/Fm5jXsbDBcobE9yxm7BNn+LCQxnvY+dfEZoq2AjlB46et42nHxupcgqSDAO4R+C6/VN5Hfo6QQIrWFDvFwP9DoaKZY1aM90C/HpdrDTupvyP2nS/a6GzRA7GNhEfd7Nu4qJxvb/5CzimiFcG4kDN7e9QDnJHY6vkTiQX4aoICjR5FG3mdHCwp5rYe4H6SMAK+Kxbng+zFGkGmCbf1652eLGPOAyOvHfV72sC4J1nLyPOjptXKL8ADXjPGCwAA"} \ No newline at end of file diff --git a/compiler/wasm/package.json b/compiler/wasm/package.json index 2c3463134e0..dd01b6d75cd 100644 --- a/compiler/wasm/package.json +++ b/compiler/wasm/package.json @@ -14,7 +14,6 @@ "package.json" ], "sideEffects": false, - "packageManager": "yarn@3.5.1", "repository": { "type": "git", "url": "https://github.com/noir-lang/noir.git" @@ -26,9 +25,10 @@ "test:browser": "web-test-runner" }, "peerDependencies": { - "@noir-lang/noir-source-resolver": "^1.1.3" + "@noir-lang/source-resolver": "workspace:*" }, "devDependencies": { + "@esm-bundle/chai": "^4.3.4-fix.0", "@web/dev-server-esbuild": "^0.3.6", "@web/test-runner": "^0.15.3", "@web/test-runner-playwright": "^0.10.0", diff --git a/compiler/wasm/src/lib.rs b/compiler/wasm/src/lib.rs index b4e18d3cece..2a659b94965 100644 --- a/compiler/wasm/src/lib.rs +++ b/compiler/wasm/src/lib.rs @@ -9,13 +9,6 @@ use serde::{Deserialize, Serialize}; use std::str::FromStr; use wasm_bindgen::prelude::*; -// This dependency is not used. We import it -// to bypass the `unused_crate_dependencies` lint. -// -// It is being imported as we get errors regarding the -// js feature not being enabled. -use getrandom as _; - mod circuit; mod compile; diff --git a/compiler/wasm/test/index.d.ts b/compiler/wasm/test/index.d.ts index 4c66dc4c1cc..b64901ebda2 100644 --- a/compiler/wasm/test/index.d.ts +++ b/compiler/wasm/test/index.d.ts @@ -1 +1 @@ -declare module '@noir-lang/noir-source-resolver'; \ No newline at end of file +declare module '@noir-lang/source-resolver'; \ No newline at end of file diff --git a/compiler/wasm/test/shared.ts b/compiler/wasm/test/shared.ts index 1d601560e74..24a09cc1a04 100644 --- a/compiler/wasm/test/shared.ts +++ b/compiler/wasm/test/shared.ts @@ -1,4 +1,4 @@ -import { initialiseResolver } from "@noir-lang/noir-source-resolver"; +import { initializeResolver } from "@noir-lang/source-resolver"; import { compile } from "@noir-lang/noir_wasm"; export const noirSourcePath = "../../noir-script/src/main.nr"; @@ -8,7 +8,7 @@ export const nargoArtifactPath = export async function compileNoirSource(noir_source: string): Promise { console.log("Compiling Noir source..."); - initialiseResolver((id: String) => { + initializeResolver((id: String) => { console.log(`Resolving source ${id}`); const source = noir_source; diff --git a/compiler/wasm/web-test-runner.config.mjs b/compiler/wasm/web-test-runner.config.mjs index 111c1ca627d..3fd65d56618 100644 --- a/compiler/wasm/web-test-runner.config.mjs +++ b/compiler/wasm/web-test-runner.config.mjs @@ -9,8 +9,8 @@ const reporter = process.env.CI ? summaryReporter() : defaultReporter(); export default { browsers: [ playwrightLauncher({ product: "chromium" }), - playwrightLauncher({ product: "webkit" }), - playwrightLauncher({ product: "firefox" }), + // playwrightLauncher({ product: "webkit" }), + // playwrightLauncher({ product: "firefox" }), ], plugins: [ esbuildPlugin({ diff --git a/deny.toml b/deny.toml index 8d6d609bff8..f29dc95a9d7 100644 --- a/deny.toml +++ b/deny.toml @@ -15,7 +15,7 @@ notice = "warn" # Lint level for when multiple versions of the same crate are detected multiple-versions = "warn" # Lint level for when a crate version requirement is `*` -wildcards = "allow" +wildcards = "warn" highlight = "all" # List of crates to deny deny = [ @@ -97,4 +97,4 @@ unknown-registry = "warn" unknown-git = "deny" allow-git = [ "https://github.com/jfecher/chumsky" -] \ No newline at end of file +] diff --git a/package.json b/package.json index 43833c7d17e..873ced5f3d1 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "compiler/source-resolver", "tooling/noirc_abi_wasm", "compiler/integration-tests", + "tooling/noir_js", "release-tests" ], "scripts": { @@ -15,16 +16,13 @@ "test:integration": "yarn workspace integration-tests test" }, "devDependencies": { - "@esm-bundle/chai": "^4.3.4-fix.0", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "chai": "^4.3.7", "eslint": "^8.40.0", "eslint-plugin-prettier": "^4.2.1", - "fflate": "^0.8.0", "mocha": "^10.2.0", "prettier": "^2.8.8", - "smol-toml": "^1.1.2", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/release-please-config.json b/release-please-config.json index e06379f5ae7..ef222bef77f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -22,6 +22,16 @@ "type": "json", "path": "tooling/noirc_abi_wasm/package.json", "jsonpath": "$.version" + }, + { + "type": "json", + "path": "tooling/noir_js/package.json", + "jsonpath": "$.version" + }, + { + "type": "json", + "path": "compiler/source-resolver/package.json", + "jsonpath": "$.version" } ] } diff --git a/crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/Nargo.toml b/tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/Nargo.toml rename to tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/Nargo.toml diff --git a/crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/Prover.toml b/tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/Prover.toml rename to tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/Prover.toml diff --git a/crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/src/main.nr b/tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/execution_success/regression_mem_op_predicate/src/main.nr rename to tooling/nargo_cli/tests/execution_success/regression_mem_op_predicate/src/main.nr diff --git a/tooling/noir_js/package.json b/tooling/noir_js/package.json new file mode 100644 index 00000000000..5eeccc3c790 --- /dev/null +++ b/tooling/noir_js/package.json @@ -0,0 +1,25 @@ +{ + "name": "@noir-lang/noir_js", + "collaborators": [ + "The Noir Team " + ], + "version": "0.0.1", + "packageManager": "yarn@3.5.1", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@noir-lang/acvm_js": "0.26.1", + "@noir-lang/noirc_abi": "workspace:*" + }, + "files": [ + "lib", + "package.json" + ], + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc" + }, + "devDependencies": { + "typescript": "^5.2.2" + } +} diff --git a/tooling/noir_js/src/index.ts b/tooling/noir_js/src/index.ts new file mode 100644 index 00000000000..2b3bf593d0c --- /dev/null +++ b/tooling/noir_js/src/index.ts @@ -0,0 +1,3 @@ +import * as acvm from "@noir-lang/acvm_js"; +import * as noirc from "@noir-lang/noirc_abi"; +export { acvm, noirc } \ No newline at end of file diff --git a/tooling/noir_js/tsconfig.json b/tooling/noir_js/tsconfig.json new file mode 100644 index 00000000000..45c1f060a57 --- /dev/null +++ b/tooling/noir_js/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "esnext", + "declaration": true, + "emitDeclarationOnly": false, + "module": "ESNext", + "moduleResolution": "node", + "outDir": "./lib", + "esModuleInterop": true, + "strict": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/tooling/noirc_abi_wasm/.gitignore b/tooling/noirc_abi_wasm/.gitignore deleted file mode 100644 index 07c883e0b8a..00000000000 --- a/tooling/noirc_abi_wasm/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Yarn -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions \ No newline at end of file diff --git a/tooling/noirc_abi_wasm/Cargo.toml b/tooling/noirc_abi_wasm/Cargo.toml index 3383d3f21e8..0a40dc157d2 100644 --- a/tooling/noirc_abi_wasm/Cargo.toml +++ b/tooling/noirc_abi_wasm/Cargo.toml @@ -23,10 +23,6 @@ gloo-utils = { version = "0.1", features = ["serde"] } js-sys = "0.3.62" -# This is an unused dependency, we are adding it -# so that we can enable the js feature in getrandom. -getrandom = { version = "*", features = ["js"] } - [build-dependencies] build-data = "0.1.3" diff --git a/tooling/noirc_abi_wasm/build.sh b/tooling/noirc_abi_wasm/build.sh index 22acdd06cba..8157e42c6de 100755 --- a/tooling/noirc_abi_wasm/build.sh +++ b/tooling/noirc_abi_wasm/build.sh @@ -38,7 +38,7 @@ rm -rf $self_path/result >/dev/null 2>&1 if [ -v out ]; then echo "Will install package to $out (defined outside installPhase.sh script)" else - out="$self_path/outputs/out" + export out="$self_path/outputs/out" echo "Will install package to $out" fi diff --git a/tooling/noirc_abi_wasm/installPhase.sh b/tooling/noirc_abi_wasm/installPhase.sh index 17c86dac4d8..a71b3f8cd0e 100755 --- a/tooling/noirc_abi_wasm/installPhase.sh +++ b/tooling/noirc_abi_wasm/installPhase.sh @@ -3,10 +3,6 @@ export self_path=$(dirname "$(readlink -f "$0")") mkdir -p $out cp $self_path/README.md $out/ +cp $self_path/package.json $out/ cp -r $self_path/nodejs $out/ cp -r $self_path/web $out/ - -# The main package.json contains several keys which are incorrect/unwanted when distributing. -cat $self_path/package.json \ -| jq 'del(.private, .devDependencies, .scripts, .packageManager)' \ -> $out/package.json diff --git a/tooling/noirc_abi_wasm/package.json b/tooling/noirc_abi_wasm/package.json index fb5db6a97dc..ffae4155098 100644 --- a/tooling/noirc_abi_wasm/package.json +++ b/tooling/noirc_abi_wasm/package.json @@ -21,7 +21,6 @@ "type": "git", "url": "https://github.com/noir-lang/noir.git" }, - "packageManager": "yarn@3.5.1", "scripts": { "build": "bash ./build.sh", "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha", @@ -29,6 +28,7 @@ "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0" }, "devDependencies": { + "@esm-bundle/chai": "^4.3.4-fix.0", "@web/dev-server-esbuild": "^0.3.6", "@web/test-runner": "^0.15.3", "@web/test-runner-playwright": "^0.10.0", diff --git a/tooling/noirc_abi_wasm/src/lib.rs b/tooling/noirc_abi_wasm/src/lib.rs index 91ed724a101..ca44343f67c 100644 --- a/tooling/noirc_abi_wasm/src/lib.rs +++ b/tooling/noirc_abi_wasm/src/lib.rs @@ -2,9 +2,6 @@ #![warn(unreachable_pub)] #![warn(clippy::semicolon_if_nothing_returned)] -// See Cargo.toml for explanation. -use getrandom as _; - use acvm::acir::native_types::WitnessMap; use iter_extended::try_btree_map; use noirc_abi::{errors::InputParserError, input_parser::InputValue, Abi, MAIN_RETURN_NAME}; diff --git a/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts b/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts index 058c022ec65..2ca45d78f5c 100644 --- a/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts +++ b/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts @@ -1,5 +1,9 @@ import { expect } from "@esm-bundle/chai"; -import initNoirAbi, { abiEncode, abiDecode, WitnessMap } from "../../../../result"; +import initNoirAbi, { + abiEncode, + abiDecode, + WitnessMap, +} from "@noir-lang/noirc_abi"; import { DecodedInputs } from "../types"; beforeEach(async () => { @@ -12,7 +16,6 @@ it("recovers original inputs when abi encoding and decoding", async () => { const initial_witness: WitnessMap = abiEncode(abi, inputs, null); const decoded_inputs: DecodedInputs = abiDecode(abi, initial_witness); - expect(BigInt(decoded_inputs.inputs.foo)).to.be.equal(BigInt(inputs.foo)); expect(BigInt(decoded_inputs.inputs.bar[0])).to.be.equal( BigInt(inputs.bar[0]) @@ -21,4 +24,4 @@ it("recovers original inputs when abi encoding and decoding", async () => { BigInt(inputs.bar[1]) ); expect(decoded_inputs.return_value).to.be.null; -}); \ No newline at end of file +}); diff --git a/yarn.lock b/yarn.lock index 14252256e89..4ab122d6d5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -47,9 +47,9 @@ __metadata: linkType: hard "@babel/helper-validator-identifier@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/helper-validator-identifier@npm:7.22.15" - checksum: eb0bee4bda664c0959924bc1ad5611eacfce806f46612202dd164fef1df8fef1a11682a1e7615288987100e9fb304982b6e2a4ff07ffe842ab8765b95ed1118c + version: 7.22.19 + resolution: "@babel/helper-validator-identifier@npm:7.22.19" + checksum: cf1f94d35cdb2d0f519b31954d1c54929fb31cf8af70fed12b3a1e777c296fabe747e56d9ae3d181c1c96f33ac66aff9501189542554b6fe0508748a38c1c17f languageName: node linkType: hard @@ -270,11 +270,11 @@ __metadata: linkType: hard "@esm-bundle/chai@npm:^4.3.4-fix.0": - version: 4.3.4-fix.0 - resolution: "@esm-bundle/chai@npm:4.3.4-fix.0" + version: 4.3.4 + resolution: "@esm-bundle/chai@npm:4.3.4" dependencies: "@types/chai": ^4.2.12 - checksum: 565b0a92775bb277726fbd687826157596325f7a38fc51baa695e9adc13f629be3b76a2a38830781b238acce469e49f729ff7b4dc886e9a2dc6ecbdb82227693 + checksum: 6d1237e9b8309b31ca55d12abe03642ab58550fdac24d0acbfeae6ab14182f72cedf646c6e858fd7ef592b4034ddd23ce5882ff22b8ab9b7952327e9f3f8c3f5 languageName: node linkType: hard @@ -385,20 +385,20 @@ __metadata: languageName: node linkType: hard -"@noir-lang/acvm_js@npm:^0.26.0": - version: 0.26.0 - resolution: "@noir-lang/acvm_js@npm:0.26.0" - checksum: 3325b611fec4531363cb67682d50ea40cbeaf8da7672c8373cb11bc7786308a14c61804950b4805e071edc9298005039847621a8d79fae185eda2cf981c64b39 +"@noir-lang/acvm_js@npm:0.26.1, @noir-lang/acvm_js@npm:^0.26.1": + version: 0.26.1 + resolution: "@noir-lang/acvm_js@npm:0.26.1" + checksum: ae8cb6e31610cd8aa392855342d0c953a1bc4cd9e07236340341afa5815696a69a6635c38241f1d6a5dd30c5a8ae49234f2ba8b71d46c5d1a46756ff6f4dde3a languageName: node linkType: hard -"@noir-lang/noir-source-resolver@workspace:*, @noir-lang/noir-source-resolver@workspace:compiler/source-resolver": +"@noir-lang/noir_js@workspace:tooling/noir_js": version: 0.0.0-use.local - resolution: "@noir-lang/noir-source-resolver@workspace:compiler/source-resolver" + resolution: "@noir-lang/noir_js@workspace:tooling/noir_js" dependencies: - "@types/node": ^20.5.7 - ava: ^5.2.0 - typescript: 4.9.4 + "@noir-lang/acvm_js": 0.26.1 + "@noir-lang/noirc_abi": "workspace:*" + typescript: ^5.2.2 languageName: unknown linkType: soft @@ -406,13 +406,14 @@ __metadata: version: 0.0.0-use.local resolution: "@noir-lang/noir_wasm@workspace:compiler/wasm" dependencies: + "@esm-bundle/chai": ^4.3.4-fix.0 "@web/dev-server-esbuild": ^0.3.6 "@web/test-runner": ^0.15.3 "@web/test-runner-playwright": ^0.10.0 "@web/test-runner-webdriver": ^0.7.0 mocha: ^10.2.0 peerDependencies: - "@noir-lang/noir-source-resolver": ^1.1.3 + "@noir-lang/source-resolver": "workspace:*" languageName: unknown linkType: soft @@ -420,6 +421,7 @@ __metadata: version: 0.0.0-use.local resolution: "@noir-lang/noirc_abi@workspace:tooling/noirc_abi_wasm" dependencies: + "@esm-bundle/chai": ^4.3.4-fix.0 "@web/dev-server-esbuild": ^0.3.6 "@web/test-runner": ^0.15.3 "@web/test-runner-playwright": ^0.10.0 @@ -433,21 +435,28 @@ __metadata: version: 0.0.0-use.local resolution: "@noir-lang/root@workspace:." dependencies: - "@esm-bundle/chai": ^4.3.4-fix.0 "@typescript-eslint/eslint-plugin": ^5.59.5 "@typescript-eslint/parser": ^5.59.5 chai: ^4.3.7 eslint: ^8.40.0 eslint-plugin-prettier: ^4.2.1 - fflate: ^0.8.0 mocha: ^10.2.0 prettier: ^2.8.8 - smol-toml: ^1.1.2 ts-node: ^10.9.1 typescript: ^5.0.4 languageName: unknown linkType: soft +"@noir-lang/source-resolver@workspace:*, @noir-lang/source-resolver@workspace:compiler/source-resolver": + version: 0.0.0-use.local + resolution: "@noir-lang/source-resolver@workspace:compiler/source-resolver" + dependencies: + "@types/node": ^20.5.7 + ava: ^5.2.0 + typescript: 4.9.4 + languageName: unknown + linkType: soft + "@npmcli/fs@npm:^3.1.0": version: 3.1.0 resolution: "@npmcli/fs@npm:3.1.0" @@ -510,19 +519,19 @@ __metadata: linkType: hard "@puppeteer/browsers@npm:^1.6.0": - version: 1.7.0 - resolution: "@puppeteer/browsers@npm:1.7.0" + version: 1.7.1 + resolution: "@puppeteer/browsers@npm:1.7.1" dependencies: debug: 4.3.4 extract-zip: 2.0.1 progress: 2.0.3 - proxy-agent: 6.3.0 + proxy-agent: 6.3.1 tar-fs: 3.0.4 unbzip2-stream: 1.4.3 yargs: 17.7.1 bin: browsers: lib/cjs/main-cli.js - checksum: 0a2aecc72fb94a8d94246188f94cfaad730d1d372b34df94ca51ff8a94596bf475a0fee162c317a768fa4b2a707bfa8afd582d594958f49e1019effadfe744b6 + checksum: fb7cf7773a1aed4e34ce0952dbf9609a164e624d4f8e1f342b816fe3e983888d7a7b2fbafc963559e96cb5bca0d75fb9c81f2097f9b1f5478a0f1cc7cbc12dff languageName: node linkType: hard @@ -799,24 +808,24 @@ __metadata: linkType: hard "@types/keygrip@npm:*": - version: 1.0.2 - resolution: "@types/keygrip@npm:1.0.2" - checksum: 60bc2738a4f107070ee3d96f44709cb38f3a96c7ccabab09f56c1b2b4d85f869fd8fb9f1f2937e863d0e9e781f005c2223b823bf32b859185b4f52370c352669 + version: 1.0.3 + resolution: "@types/keygrip@npm:1.0.3" + checksum: adee9a3efda3db9c64466af1c7c91a6d049420ee50589500cfd36e3e38d6abefdd858da88e6da63ed186e588127af3e862c1dc64fb0ad45c91870e6c35fe3be0 languageName: node linkType: hard "@types/koa-compose@npm:*": - version: 3.2.5 - resolution: "@types/koa-compose@npm:3.2.5" + version: 3.2.6 + resolution: "@types/koa-compose@npm:3.2.6" dependencies: "@types/koa": "*" - checksum: 5d1147c4b057eb158195f442f0384f06503f3e69dba99fb517b30a05261a9f92928945c12bb1cfc17a5b7d60db003f38b455a3a9b125f12e4fc81fffa396b3cf + checksum: 1204c5bfa4c69448b692aba29c566ef6bedbdbe5842fa180450267a23d3606faa13ef209876fd0c989edb5bc381812a66610fcfeac196ce4e76364354756ba1f languageName: node linkType: hard "@types/koa@npm:*, @types/koa@npm:^2.11.6": - version: 2.13.8 - resolution: "@types/koa@npm:2.13.8" + version: 2.13.9 + resolution: "@types/koa@npm:2.13.9" dependencies: "@types/accepts": "*" "@types/content-disposition": "*" @@ -826,7 +835,7 @@ __metadata: "@types/keygrip": "*" "@types/koa-compose": "*" "@types/node": "*" - checksum: 76a2a6d219c65f242a43efca42970d864701c58319c346a91dd8c3b4df2021786fd0d600a88dfb098358c9085f9f4a2dfe62563641441cf21e11e2bfe04f4fdf + checksum: af9cd599c8e17e2ae0f4168a61d964e343f713d002b65fd995658d7addc6551ccadecfd32b3405cf44e4d360178ee4f972d6881533548261ae1f636a655d24b1 languageName: node linkType: hard @@ -859,16 +868,16 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^20.1.0, @types/node@npm:^20.5.7": - version: 20.6.0 - resolution: "@types/node@npm:20.6.0" - checksum: 52611801af5cf151c6fac1963aa4a8a8ca2e388a9e9ed82b01b70bca762088ded5b32cc789c5564220d5d7dccba2b8dd34446a3d4fc74736805e1f2cf262e29d + version: 20.6.1 + resolution: "@types/node@npm:20.6.1" + checksum: f9848617221b513d558071c804b006750d1ee1734c5ffea3ada9a0edd1642334ad0812222d6b99b7b8c0e1a5f1e557946ae99444c2705e9afc125abdf9fa36c2 languageName: node linkType: hard "@types/node@npm:^18.7.20": - version: 18.17.15 - resolution: "@types/node@npm:18.17.15" - checksum: eed11d4398ccdb999a4c65658ee75de621a4ad57aece48ed2fb8803b1e2711fadf58d8aefbdb0a447d69cf3cba602ca32fe0fc92077575950a796e1dc13baa0f + version: 18.17.16 + resolution: "@types/node@npm:18.17.16" + checksum: 8f9dbaf4a67a14110e2a0d805f9b57f3a5cda774dbcb7b1e7973efe31d5eeea358482dbe36a5bfadb0dde99f065f1ae0531f25a032f015871aa0b2896eb3c4ae languageName: node linkType: hard @@ -917,9 +926,9 @@ __metadata: linkType: hard "@types/semver@npm:^7.3.12": - version: 7.5.1 - resolution: "@types/semver@npm:7.5.1" - checksum: 2fffe938c7ac168711f245a16e1856a3578d77161ca17e29a05c3e02c7be3e9c5beefa29a3350f6c1bd982fb70aa28cc52e4845eb7d36246bcdc0377170d584d + version: 7.5.2 + resolution: "@types/semver@npm:7.5.2" + checksum: 743aa8a2b58e20b329c19bd2459152cb049d12fafab7279b90ac11e0f268c97efbcb606ea0c681cca03f79015381b40d9b1244349b354270bec3f939ed49f6e9 languageName: node linkType: hard @@ -1099,19 +1108,19 @@ __metadata: languageName: node linkType: hard -"@wdio/config@npm:8.16.3": - version: 8.16.3 - resolution: "@wdio/config@npm:8.16.3" +"@wdio/config@npm:8.16.7": + version: 8.16.7 + resolution: "@wdio/config@npm:8.16.7" dependencies: "@wdio/logger": 8.11.0 - "@wdio/types": 8.16.3 - "@wdio/utils": 8.16.3 + "@wdio/types": 8.16.7 + "@wdio/utils": 8.16.7 decamelize: ^6.0.0 deepmerge-ts: ^5.0.0 glob: ^10.2.2 import-meta-resolve: ^3.0.0 read-pkg-up: ^10.0.0 - checksum: 8a9eb4a6472432ac6c3e1716b0aad38d88490e93f01fd0b3acc9087af65491f5bfb180fe21629bea27e1158487ec327d9fe85878fda58db1bafa95ab88b35f6f + checksum: 3eeaccfb8876c54101ad6d3c122e07d4e60dd3c69a9596b3b24333804835af60103bfa660c0d784dd1444263771a003879787eba3030f1179433b5330697a0a3 languageName: node linkType: hard @@ -1143,22 +1152,22 @@ __metadata: languageName: node linkType: hard -"@wdio/types@npm:8.16.3": - version: 8.16.3 - resolution: "@wdio/types@npm:8.16.3" +"@wdio/types@npm:8.16.7": + version: 8.16.7 + resolution: "@wdio/types@npm:8.16.7" dependencies: "@types/node": ^20.1.0 - checksum: c50be3244a80f24f905a16b58e1f2f45d8d00ba4304459386e0c00b3ee852e5a2ddcd0e2fffe35d38a4aa4bd33c65bae3f129203f69d343baa9a7c2b2a096381 + checksum: ac1aeeac85935319e8b87241574db0c19905c4c706205a81a33fa66a67e01a76fec4e0af96df7c160a17351de180c7f3eceaed6b1fc9d543f4533257577605fe languageName: node linkType: hard -"@wdio/utils@npm:8.16.3": - version: 8.16.3 - resolution: "@wdio/utils@npm:8.16.3" +"@wdio/utils@npm:8.16.7": + version: 8.16.7 + resolution: "@wdio/utils@npm:8.16.7" dependencies: "@puppeteer/browsers": ^1.6.0 "@wdio/logger": 8.11.0 - "@wdio/types": 8.16.3 + "@wdio/types": 8.16.7 decamelize: ^6.0.0 deepmerge-ts: ^5.1.0 edgedriver: ^5.3.5 @@ -1169,7 +1178,7 @@ __metadata: locate-app: ^2.1.0 safaridriver: ^0.1.0 wait-port: ^1.0.4 - checksum: bca49212218b69e9edd4af1142d16e8403b2918e70a630d5f7b2f408c65c2ac48faf5488aec26053d3c3550b73773e0ad9dbaeedcd49f2e31bab2e455e0863e0 + checksum: 0d064f85f4b436728751574f1993cc541f0c395c583cd6d90dd24f3410c66ed120a69b073b344de96bfaf4203109e1c6abbc9fe1f57a19f6fc7e297cc3cc6fb7 languageName: node linkType: hard @@ -2934,8 +2943,8 @@ __metadata: linkType: hard "edgedriver@npm:^5.3.5": - version: 5.3.6 - resolution: "edgedriver@npm:5.3.6" + version: 5.3.7 + resolution: "edgedriver@npm:5.3.7" dependencies: "@wdio/logger": ^8.11.0 decamelize: ^6.0.0 @@ -2945,7 +2954,7 @@ __metadata: which: ^4.0.0 bin: edgedriver: bin/edgedriver.js - checksum: 01d2477e6d05f3e797dee0f53beb38787cd79f958efc2c69fc47e66201b3ab0896d97eb337529d97501432c790197ff63528bb5bc6bfc79297d95c9306d0a976 + checksum: 57fb6e2fee696ed8a59ee9971143b31528f249be5c1287d6cc679ff7ba515bab6dfd6664aebdca238e3d19314f84f9e2ddec86265395adeebafeb8caa5bdb017 languageName: node linkType: hard @@ -3646,6 +3655,16 @@ __metadata: languageName: node linkType: hard +"fsevents@npm:2.3.2": + version: 2.3.2 + resolution: "fsevents@npm:2.3.2" + dependencies: + node-gyp: latest + checksum: 97ade64e75091afee5265e6956cb72ba34db7819b4c3e94c431d4be2b19b8bb7a2d4116da417950c3425f17c8fe693d25e20212cac583ac1521ad066b77ae31f + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" @@ -3656,6 +3675,15 @@ __metadata: languageName: node linkType: hard +"fsevents@patch:fsevents@2.3.2#~builtin": + version: 2.3.2 + resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" @@ -4011,11 +4039,11 @@ __metadata: linkType: hard "hosted-git-info@npm:^7.0.0": - version: 7.0.0 - resolution: "hosted-git-info@npm:7.0.0" + version: 7.0.1 + resolution: "hosted-git-info@npm:7.0.1" dependencies: lru-cache: ^10.0.1 - checksum: b892237a3867f827f97e229e2b6ddf17d3ed674f003475c12ecbfc6269416db3a643c1ee3c5d4a989e3f3a596dd1470ee4017fe911710e47aeb7d9319737c05e + checksum: be5280f0a20d6153b47e1ab578e09f5ae8ad734301b3ed7e547dc88a6814d7347a4888db1b4f9635cc738e3c0ef1fbff02272aba7d07c75d4c5a50ff8d618db6 languageName: node linkType: hard @@ -4254,14 +4282,15 @@ __metadata: resolution: "integration-tests@workspace:compiler/integration-tests" dependencies: "@aztec/bb.js": ^0.5.1 - "@noir-lang/acvm_js": ^0.26.0 - "@noir-lang/noir-source-resolver": "workspace:*" + "@noir-lang/acvm_js": ^0.26.1 "@noir-lang/noir_wasm": "workspace:*" "@noir-lang/noirc_abi": "workspace:*" + "@noir-lang/source-resolver": "workspace:*" "@web/dev-server-esbuild": ^0.3.6 "@web/test-runner": ^0.15.3 - "@web/test-runner-playwright": ^0.10.0 "@web/test-runner-webdriver": ^0.7.0 + fflate: ^0.8.0 + smol-toml: ^1.1.2 languageName: unknown linkType: soft @@ -5656,7 +5685,7 @@ __metadata: languageName: node linkType: hard -"pac-proxy-agent@npm:^7.0.0": +"pac-proxy-agent@npm:^7.0.0, pac-proxy-agent@npm:^7.0.1": version: 7.0.1 resolution: "pac-proxy-agent@npm:7.0.1" dependencies: @@ -5818,23 +5847,27 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.37.1": - version: 1.37.1 - resolution: "playwright-core@npm:1.37.1" +"playwright-core@npm:1.38.0": + version: 1.38.0 + resolution: "playwright-core@npm:1.38.0" bin: playwright-core: cli.js - checksum: 69f818da2230057584140d5b3af7778a4f4a822b5b18d133abfc5d259128becb943c343a2ddf6b0635277a69f28983e83e2bc3fce23595ececb1e410475b6368 + checksum: 9eb43fc6c3cb392d5f35b0fd0b7291b38a8cbdc3cbb944a8261f744f30d09196dfa3b5d84aa02ffc09af87d08d31b385b007b6af20d0b6cd50a29344f3b0db8d languageName: node linkType: hard "playwright@npm:^1.22.2": - version: 1.37.1 - resolution: "playwright@npm:1.37.1" + version: 1.38.0 + resolution: "playwright@npm:1.38.0" dependencies: - playwright-core: 1.37.1 + fsevents: 2.3.2 + playwright-core: 1.38.0 + dependenciesMeta: + fsevents: + optional: true bin: playwright: cli.js - checksum: 99406ef3e15b83a659cb23ef1d92d9935789aad430580d1e0371087dfdf266891483c6f97cfa06bf5f49f081eacd44245d05d20714f98531edef4cc317044d6b + checksum: c5356690a391d5dd41f814d4e2694b93ba9e79381ce63de752da1c6c59b1f9c69bc6be853d973d0542d73a44a6b15f7c0081a164a64cd27b6b31207710c0ab34 languageName: node linkType: hard @@ -5932,6 +5965,22 @@ __metadata: languageName: node linkType: hard +"proxy-agent@npm:6.3.1": + version: 6.3.1 + resolution: "proxy-agent@npm:6.3.1" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.2 + lru-cache: ^7.14.1 + pac-proxy-agent: ^7.0.1 + proxy-from-env: ^1.1.0 + socks-proxy-agent: ^8.0.2 + checksum: 31030da419da31809340ac2521090c9a5bf4fe47a944843f829b3502883208c8586a468955e64b694140a41d70af6f45cf4793f5efd4a6f3ed94e5ac8023e36d + languageName: node + linkType: hard + "proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" @@ -6192,28 +6241,28 @@ __metadata: linkType: hard "resolve@npm:^1.19.0": - version: 1.22.4 - resolution: "resolve@npm:1.22.4" + version: 1.22.5 + resolution: "resolve@npm:1.22.5" dependencies: is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 23f25174c2736ce24c6d918910e0d1f89b6b38fefa07a995dff864acd7863d59a7f049e691f93b4b2ee29696303390d921552b6d1b841ed4a8101f517e1d0124 + checksum: 6d8c8e414c0727341bc5b78d3806aa6730975d6c633ff266e90f3502ae1c10353d3535c9810aa94187a32ea192b9b3722afecac67487e27f44e60d89cca45cda languageName: node linkType: hard "resolve@patch:resolve@^1.19.0#~builtin": - version: 1.22.4 - resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" + version: 1.22.5 + resolution: "resolve@patch:resolve@npm%3A1.22.5#~builtin::version=1.22.5&hash=c3c19d" dependencies: is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: c45f2545fdc4d21883861b032789e20aa67a2f2692f68da320cc84d5724cd02f2923766c5354b3210897e88f1a7b3d6d2c7c22faeead8eed7078e4c783a444bc + checksum: 8478df3911a3420450038b87aab4a6c66b91461035d901cd794076b46adfbf157fcfc8e83e3d0ef41a5956ce72ae166c33bd78432d6b41d43ee473b05c51cb32 languageName: node linkType: hard @@ -7069,7 +7118,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.0.4": +"typescript@npm:^5.0.4, typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" bin: @@ -7089,7 +7138,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^5.0.4#~builtin": +"typescript@patch:typescript@^5.0.4#~builtin, typescript@patch:typescript@^5.2.2#~builtin": version: 5.2.2 resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" bin: @@ -7279,36 +7328,36 @@ __metadata: languageName: node linkType: hard -"webdriver@npm:8.16.5": - version: 8.16.5 - resolution: "webdriver@npm:8.16.5" +"webdriver@npm:8.16.7": + version: 8.16.7 + resolution: "webdriver@npm:8.16.7" dependencies: "@types/node": ^20.1.0 "@types/ws": ^8.5.3 - "@wdio/config": 8.16.3 + "@wdio/config": 8.16.7 "@wdio/logger": 8.11.0 "@wdio/protocols": 8.16.5 - "@wdio/types": 8.16.3 - "@wdio/utils": 8.16.3 + "@wdio/types": 8.16.7 + "@wdio/utils": 8.16.7 deepmerge-ts: ^5.1.0 got: ^ 12.6.1 ky: ^0.33.0 ws: ^8.8.0 - checksum: 989185d0514f6226a77b890e4a595e42ee45e9c4a903cd2c78833f10f6e3e41b45809547498438348b82b6401f69576480cbd910816a35ddba1107d9e0730202 + checksum: e53546c5d330e93b21dfa1f970aed858d9c05408a2abab94196b6d51e9bbe2c3bcccd4f8e7e758cbec13148e31aabe4dd28050881d7aa09a336332d00610ab82 languageName: node linkType: hard "webdriverio@npm:^8.8.6": - version: 8.16.6 - resolution: "webdriverio@npm:8.16.6" + version: 8.16.7 + resolution: "webdriverio@npm:8.16.7" dependencies: "@types/node": ^20.1.0 - "@wdio/config": 8.16.3 + "@wdio/config": 8.16.7 "@wdio/logger": 8.11.0 "@wdio/protocols": 8.16.5 "@wdio/repl": 8.10.1 - "@wdio/types": 8.16.3 - "@wdio/utils": 8.16.3 + "@wdio/types": 8.16.7 + "@wdio/utils": 8.16.7 archiver: ^6.0.0 aria-query: ^5.0.0 css-shorthand-properties: ^1.1.1 @@ -7325,13 +7374,13 @@ __metadata: resq: ^1.9.1 rgb2hex: 0.2.5 serialize-error: ^11.0.1 - webdriver: 8.16.5 + webdriver: 8.16.7 peerDependencies: devtools: ^8.14.0 peerDependenciesMeta: devtools: optional: true - checksum: 86aff096d39f4df7bed39017df2c15d651f87652a97bb04d49e8cdec23fa2bf967317f90693a9858b8ac4e87f11eb08640084d96f5e05728d76434e781c4f44d + checksum: 6be1952f7ce4a87bf95ef2624f674a9f3d0f1483f91bf6bcec47f2766d496ba670aa564fad547695913439ffccc36b9a702e2922538cb0d128fa9ee4a39d5929 languageName: node linkType: hard