Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add initial version of noir.js #2681

Merged
merged 15 commits into from
Sep 14, 2023
Merged
53 changes: 53 additions & 0 deletions .github/workflows/noir-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release and Publish Noir Js

on:
workflow_dispatch:
inputs:
version:
description: "Version number"
required: false

jobs:
release-noir-js:
name: Release and Publish Noir Js
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Bump version
working-directory: ./tooling/noir_js
id: bump_version
run: |
if [ -z "${{ github.event.inputs.version }}" ]; then
NEW_VERSION=$(npm version patch --no-git-tag-version)
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
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: ./tooling/noir_js
run: npm install

- name: Build noir-source-resolver
working-directory: ./tooling/noir_js
run: npm run build
kevaundray marked this conversation as resolved.
Show resolved Hide resolved

- name: Publish to NPM
working-directory: ./tooling/noir_js
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 tooling/noir_js/package-lock.json
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
git add tooling/noir_js/package.json
git commit -m "chore: Update noir-js to ${{ env.NEW_VERSION }}"
git push
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"compiler/source-resolver",
"tooling/noirc_abi_wasm",
"compiler/integration-tests",
"tooling/noir_js",
"release-tests"
],
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions tooling/noir_js/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as acvm from "@noir-lang/acvm_js";
import * as noirc from "@noir-lang/noirc_abi";
export { acvm, noirc }
13 changes: 13 additions & 0 deletions tooling/noir_js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "@noir-lang/noir_js",
"collaborators": [
"The Noir Team <team@noir-lang.org>"
],
"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:*"
}
}
13 changes: 13 additions & 0 deletions tooling/noir_js/yarn.lock
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@noir-lang/acvm_js@0.26.1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@noir-lang/acvm_js/-/acvm_js-0.26.1.tgz#5dc5d4f54a1663ff0096ab3e7633c126418bd0f0"
integrity sha512-pEZxMIV90nryLbFEzSBEWX3sYpjjN8rTnkD78Vd0ctTFFBdl202sX58LGe11NNH3BOLGvxcJXzv3XXjrVir0Tw==

"@noir-lang/noirc_abi@0.10.3":
version "0.10.3"
resolved "https://registry.yarnpkg.com/@noir-lang/noirc_abi/-/noirc_abi-0.10.3.tgz#5f80ff0be441a8a802be76a2bff09947f6de891a"
integrity sha512-l5T/iF8nrOhV2hMS6byUwOtxPTF1DfZtNFw0028ExQ68Z25KD3hXwg6VlUtmaEhQ83e1PUdGEyss9UnA4fmFxQ==
16 changes: 16 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ __metadata:
languageName: node
linkType: hard

"@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/acvm_js@npm:^0.26.0":
version: 0.26.0
resolution: "@noir-lang/acvm_js@npm:0.26.0"
Expand All @@ -402,6 +409,15 @@ __metadata:
languageName: unknown
linkType: soft

"@noir-lang/noir_js@workspace:tooling/noir_js":
version: 0.0.0-use.local
resolution: "@noir-lang/noir_js@workspace:tooling/noir_js"
dependencies:
"@noir-lang/acvm_js": 0.26.1
"@noir-lang/noirc_abi": "workspace:*"
languageName: unknown
linkType: soft

"@noir-lang/noir_wasm@workspace:*, @noir-lang/noir_wasm@workspace:compiler/wasm":
version: 0.0.0-use.local
resolution: "@noir-lang/noir_wasm@workspace:compiler/wasm"
Expand Down
Loading