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

fix(all, cli): fix pacakge references in local dev, cli should in dev… #276

Merged
merged 1 commit into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/aptos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"@sentio/sdk-aptos": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0"
"@sentio/cli": "^1.0.0-development"
}
}
3 changes: 1 addition & 2 deletions examples/aurory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0",
"@types/bs58": "^4.0.1"
"@sentio/cli": "^1.0.0-development"
}
}
2 changes: 1 addition & 1 deletion examples/sui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0"
"@sentio/cli": "^1.0.0-development"
}
}
2 changes: 1 addition & 1 deletion examples/wormhole/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@sentio/sdk-solana": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0"
"@sentio/cli": "^1.0.0-development"
}
}
2 changes: 1 addition & 1 deletion examples/x2y2-complex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0",
"@sentio/cli": "^1.0.0-development",
"ts-node": "^10.8.0"
}
}
2 changes: 1 addition & 1 deletion examples/x2y2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@sentio/cli": "^1.0.0",
"@sentio/cli": "^1.0.0-development",
"ts-node": "^10.8.0"
}
}
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sentio/cli",
"license": "Apache-2.0",
"private": false,
"version": "1.0.7",
"version": "1.0.0-development",
"scripts": {
"compile": "tsc -p . && cp src/webpack.config.js lib/",
"build": "yarn compile",
Expand Down
8 changes: 2 additions & 6 deletions packages/cli/src/commands/run-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ export async function runCreate(argv: string[]) {
const packageJsonPath = path.resolve(dstFolder, 'package.json')
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))

let cliVersion = getCliVersion()
if (!cliVersion.startsWith('^')) {
cliVersion = '^' + cliVersion
}

const sdkVersion = '^' + (await latestVersion('@sentio/sdk'))
packageJson.dependencies['@sentio/sdk'] = sdkVersion

Expand All @@ -118,7 +113,8 @@ export async function runCreate(argv: string[]) {
default:
}

packageJson.dependencies['@sentio/cli'] = cliVersion
const cliVersion = '^' + (await latestVersion('@sentio/cli'))
packageJson.devDependencies['@sentio/cli'] = cliVersion
packageJson.name = projectName

// Don't add directly to avoid deps issue
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/templates/aptos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"upload": "sentio upload"
},
"dependencies": {
"@sentio/sdk": "^1.0.0",
"@sentio/sdk-aptos": "^1.0.0"
"@sentio/sdk": "^1.0.0-development",
"@sentio/sdk-aptos": "^1.0.0-development"
},
"devDependencies": {
"@types/jest": "^29.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"upload": "sentio upload"
},
"dependencies": {
"@sentio/sdk": "^1.0.0"
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@types/jest": "^29.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/raw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"upload": "sentio upload"
},
"dependencies": {
"@sentio/sdk": "^1.0.0"
"@sentio/sdk": "^1.0.0-development"
},
"devDependencies": {
"@types/jest": "^29.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/templates/solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"upload": "sentio upload"
},
"dependencies": {
"@sentio/sdk": "^1.0.0",
"@sentio/sdk-solana": "^1.0.0"
"@sentio/sdk": "^1.0.0-development",
"@sentio/sdk-solana": "^1.0.0-development"
},
"devDependencies": {
"@types/jest": "^29.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/protos/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentio/protos",
"license": "Apache-2.0",
"version": "1.0.0",
"version": "1.0.0-development",
"scripts": {
"compile": "tsc -p .",
"clean": "tsc --build --clean",
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "jest"
},
"dependencies": {
"@sentio/protos": "^1.0.0",
"@sentio/protos": "^1.0.0-development",
"@ethersproject/providers": "~5.7.0",
"bignumber.js": "^9.1.0",
"command-line-args": "^5.2.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/sdk-all/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@sentio/sdk-all",
"license": "Apache-2.0",
"version": "1.0.0",
"version": "1.0.0-development",
"scripts": {
"compile": "tsc -p .",
"build": "yarn compile",
"build_all": "yarn lerna run --scope=@sentio/sdk-all build --include-dependencies",
"test": "jest"
},
"dependencies": {
"@sentio/sdk": "^1.0.0",
"@sentio/runtime": "^1.0.0",
"@sentio/sdk-aptos": "^1.0.0",
"@sentio/sdk-solana": "^1.0.0"
"@sentio/sdk": "^1.0.0-development",
"@sentio/runtime": "^1.0.0-development",
"@sentio/sdk-aptos": "^1.0.0-development",
"@sentio/sdk-solana": "^1.0.0-development"
},
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-aptos/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentio/sdk-aptos",
"license": "Apache-2.0",
"version": "1.0.0",
"version": "1.0.0-development",
"scripts": {
"compile": "tsc -p .",
"build": "yarn gen && yarn gen_test && yarn compile",
Expand All @@ -11,7 +11,7 @@
"gen_test": "ts-node src/run-codegen.ts src/tests/abis src/tests/types"
},
"dependencies": {
"@sentio/sdk": "^1.0.0",
"@sentio/sdk": "^1.0.0-development",
"aptos-sdk": "npm:aptos@^1.3.17",
"prettier": "^2.8.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-solana/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentio/sdk-solana",
"license": "Apache-2.0",
"version": "1.0.0",
"version": "1.0.0-development",
"scripts": {
"compile": "tsc -p .",
"build": "yarn compile",
Expand All @@ -10,7 +10,7 @@
"gen_test": "ts-node src/run-codegen.ts src/tests/abis src/tests/types"
},
"dependencies": {
"@sentio/sdk": "^1.0.0",
"@sentio/sdk": "^1.0.0-development",
"@project-serum/anchor": "^0.26.0",
"@dao-xyz/borsh": "^4.0.7",
"@solana/web3.js": "^1.47.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentio/sdk",
"license": "Apache-2.0",
"version": "1.0.0",
"version": "1.0.0-development",
"scripts": {
"compile_target": "yarn tsc -b src/target-ethers-sentio/tsconfig.json",
"compile": "tsc -p . && cp src/utils/*.csv lib/utils",
Expand All @@ -19,8 +19,8 @@
"dependencies": {
"@ethersproject/providers": "~5.7.0",
"@sentio/cli": "^1.0.0",
"@sentio/runtime": "^1.0.0",
"@sentio/protos": "^1.0.0",
"@sentio/runtime": "^1.0.0-development",
"@sentio/protos": "^1.0.0-development",
"@typechain/ethers-v5": "^10.0.0",
"bignumber.js": "^9.1.0",
"command-line-args": "^5.2.1",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,24 @@
lodash "^4.17.4"
read-pkg-up "^7.0.0"

"@sentio/cli@^1.0.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@sentio/cli/-/cli-1.1.1.tgz#84819e001b59e134d967e05d39622b05a4bb08d1"
integrity sha512-Z3WlVRdiY0V2z2pf7JxDj2e986x+0PK50ZJZjnwys2fHjRjWba63K9NulB71P9GsZCHDVXIgmHHBrdvWXpn89w==
dependencies:
command-line-args "^5.2.1"
command-line-usage "^6.1.3"
express "^4.18.2"
form-data "^4.0.0"
fs-extra "^11.0.0"
js-yaml "^4.1.0"
latest-version "^5.1.0"
node-fetch "2"
open "^8.4.0"
ts-loader "^9.3.0"
webpack "^5.72.1"
webpack-cli "^5.0.0"

"@sinclair/typebox@^0.24.1":
version "0.24.35"
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.35.tgz"
Expand Down