Skip to content

Commit

Permalink
Merge pull request #15 from wangeguo/main
Browse files Browse the repository at this point in the history
chore: update package name, switch to release to npmjs registry
  • Loading branch information
uvd authored Feb 26, 2024
2 parents 381fc3a + b39f471 commit 476e6b0
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 26 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release to ghcr.io
name: Node.js Package

on:
push:
Expand All @@ -8,9 +8,6 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -26,12 +23,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://npm.pkg.github.com
registry-url: https://registry.npmjs.org/
scope: "@${{ github.repository_owner }}"

- name: Setup registry
run: echo @${{ github.repository_owner }}:registry=https://npm.pkg.github.com >> .npmrc

- name: Install dependencies
run: yarn install

Expand All @@ -41,4 +35,4 @@ jobs:
- name: Publish package
run: yarn release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_MOVEFUNS_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Javascript version of the move language compiler and disassemble
* Compiling move package into blob example
```ts
import { WasmFs } from '@wasmer/wasmfs'
import { Git, MovePackage } from '@aptos-labs/move-js'
import { Git, MovePackage } from '@movefuns/move-js'

const startWasiTask = async (app: HTMLDivElement) => {
const wasmfs = new WasmFs()
Expand Down Expand Up @@ -56,7 +56,7 @@ startWasiTask(app)
* Disassemble contract example
```ts
import { WasmFs } from '@wasmer/wasmfs'
import { Disassemble } from '@aptos-labs/move-js'
import { Disassemble } from '@movefuns/move-js'

const startDisassembleTask = async (app: HTMLDivElement) => {
const wasmfs = new WasmFs()
Expand All @@ -81,7 +81,7 @@ startDisassembleTask(app)

## Supported Rust Versions

`@aptos-labs/move-js` supports the version of Rust (toolchain and targets) specified
`@movefuns/move-js` supports the version of Rust (toolchain and targets) specified
in [`rust-toolchain.toml`](rust-toolchain.toml). At the time of writing, we are
using version 1.77.0. However, this can change at any time if one of our
dependencies changes MSRV or through a new patch version.
Expand All @@ -94,7 +94,7 @@ Note: You will need rust installed also for this. https://www.rust-lang.org/tool
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Then get `@aptos-labs/move-js` source:
Then get `@movefuns/move-js` source:

```
git clone https://github.com/movefuns/move-js
Expand Down
2 changes: 1 addition & 1 deletion examples/disassemble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"@wasmer/wasi": "^0.12.0",
"@wasmer/wasm-transformer": "^0.10.0",
"@wasmer/wasmfs": "^0.12.0",
"@aptos-labs/move-js": "../../"
"@movefuns/move-js": "../../"
}
}
2 changes: 1 addition & 1 deletion examples/disassemble/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './style.css'

import { WasmFs } from '@wasmer/wasmfs'
import { Disassemble } from '@aptos-labs/move-js'
import { Disassemble } from '@movefuns/move-js'

const startDisassembleTask = async (app: HTMLDivElement) => {
const wasmfs = new WasmFs()
Expand Down
2 changes: 1 addition & 1 deletion examples/disassemble/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


"@aptos-labs/move-js@../../":
"@movefuns/move-js@../../":
version "0.7.1"
dependencies:
"@iarna/toml" "^2.2.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/my-counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"@wasmer/wasi": "^0.12.0",
"@wasmer/wasm-transformer": "^0.10.0",
"@wasmer/wasmfs": "^0.12.0",
"@aptos-labs/move-js": "../../"
"@movefuns/move-js": "../../"
}
}
2 changes: 1 addition & 1 deletion examples/my-counter/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './style.css'

import { WasmFs } from '@wasmer/wasmfs'
import { Git, MovePackage } from '@aptos-labs/move-js'
import { Git, MovePackage } from '@movefuns/move-js'

const startWasiTask = async (app: HTMLDivElement) => {
const wasmfs = new WasmFs()
Expand Down
2 changes: 1 addition & 1 deletion examples/my-counter/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


"@aptos-labs/move-js@../../":
"@movefuns/move-js@../../":
version "0.7.1"
dependencies:
"@iarna/toml" "^2.2.5"
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@movefuns/move-js",
"version": "0.7.1",
"version": "0.7.2",
"description": "Javascript version of the Move language compiler, supports compiling Move code into Move bytecode in the browser.",
"keywords": [
"move",
Expand All @@ -23,9 +23,6 @@
"type": "git",
"url": "https://github.com/movefuns/move-js"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"iife": "dist/index.iife.js",
Expand All @@ -44,7 +41,7 @@
"clean": "rimraf dist && rimraf pkg/*.wasm",
"release": "npm publish --access public --tag latest"
},
"author": "aptos-labs",
"author": "movefuns",
"license": "SEE LICENSE IN ./LICENSE",
"peerDependencies": {
"rollup": "2.x.x"
Expand Down
Binary file modified pkg/move_bg.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/targets/aptos/types/module.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use schemars::{self, JsonSchema};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::fmt;

Expand Down
2 changes: 1 addition & 1 deletion src/targets/aptos/types/script.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::serde_helper::vec_bytes;
use move_core_types::identifier::{IdentStr, Identifier};
use move_core_types::language_storage::{ModuleId, TypeTag};
use schemars::{self, JsonSchema};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// Call a Move script function.
Expand Down

0 comments on commit 476e6b0

Please sign in to comment.