Skip to content

Commit

Permalink
0.2.14 version bump (#811)
Browse files Browse the repository at this point in the history
* 0.2.14 version bump

* spread array

* Import contracts
  • Loading branch information
forgetso authored Nov 21, 2023
1 parent 1c3b4cf commit f18d266
Show file tree
Hide file tree
Showing 46 changed files with 333 additions and 322 deletions.
2 changes: 1 addition & 1 deletion contracts/captcha/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/captcha-contract",
"version": "0.2.13",
"version": "0.2.14",
"description": "The captcha contract",
"main": "dist/index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions contracts/captcha/src/captcha.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0xcbf8a2ccb2d44ee4a81b5af2a080f50b5c5353e833737b6456bd155d7531a675",
"hash": "0xec2eacf106b25b261f245b12d6f4b94de67dead5a779aa3e8f6d5eef93eb36b0",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "captcha",
"version": "0.2.13",
"version": "0.2.14",
"authors": [
"Chris Taylor <chris@prosopo.io>",
"George Oastler <george@prosopo.io>",
Expand Down
4 changes: 2 additions & 2 deletions contracts/captcha/src/contract-info/captcha.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/common-contract",
"version": "0.2.13",
"version": "0.2.14",
"description": "The common contract",
"main": "dist/index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions contracts/common/src/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0x3310de2401b8a9309d4769d470411ac3e99f10a6294b4deb990fce67cda37a19",
"hash": "0x04865a9a5b2a072738e7345f23f396b9d29215294fe02d6d588fee820e2d3314",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "common",
"version": "0.2.13",
"version": "0.2.14",
"authors": [
"Chris Taylor <chris@prosopo.io>",
"George Oastler <george@prosopo.io>",
Expand Down
4 changes: 2 additions & 2 deletions contracts/common/src/contract-info/common.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/proxy-contract",
"version": "0.2.13",
"version": "0.2.14",
"description": "The proxy contract",
"main": "dist/index.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions contracts/proxy/src/contract-info/proxy.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/proxy/src/proxy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0xc94835e36abfa10f531eae6dc4b73f40949f5eff4707a7ec18e0643ce08077f3",
"hash": "0x872a66d12f9d14fdf484574a0a2f52c63f5c001298d59ceeead91e99118a8c1f",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "proxy",
"version": "0.2.13",
"version": "0.2.14",
"authors": ["Chris Taylor <chris@prosopo.io>", "George Oastler <george@prosopo.io>"]
},
"spec": {
Expand Down
2 changes: 1 addition & 1 deletion demos/client-bundle-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dotenv": "^16.0.1",
"light-server": "^2.9.1"
},
"version": "0.2.13",
"version": "0.2.14",
"devDependencies": {
"tslib": "2.6.2",
"typescript": "5.1.6"
Expand Down
14 changes: 7 additions & 7 deletions demos/client-example-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example-server",
"version": "0.2.13",
"version": "0.2.14",
"description": "Backend for client-example",
"main": "dist/app.js",
"type": "module",
Expand Down Expand Up @@ -33,11 +33,11 @@
"@noble/hashes": "^1.3.1",
"@polkadot/util": "12.5.1",
"@polkadot/util-crypto": "12.5.1",
"@prosopo/api": "0.2.13",
"@prosopo/contract": "0.2.13",
"@prosopo/procaptcha": "0.2.13",
"@prosopo/server": "0.2.13",
"@prosopo/types": "0.2.13",
"@prosopo/api": "0.2.14",
"@prosopo/contract": "0.2.14",
"@prosopo/procaptcha": "0.2.14",
"@prosopo/server": "0.2.14",
"@prosopo/types": "0.2.14",
"@typegoose/auto-increment": "3.3.0",
"cors": "^2.8.5",
"jsonwebtoken": "^9.0.0",
Expand All @@ -52,6 +52,6 @@
"tslib": "2.6.2",
"typescript": "5.1.6",
"vite": "^4.5.0",
"@prosopo/config": "0.2.13"
"@prosopo/config": "0.2.14"
}
}
14 changes: 7 additions & 7 deletions demos/client-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example",
"version": "0.2.13",
"version": "0.2.14",
"private": true,
"type": "module",
"engines": {
Expand All @@ -11,19 +11,19 @@
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@mui/material": "^5.9.1",
"@prosopo/common": "0.2.13",
"@prosopo/procaptcha": "0.2.13",
"@prosopo/procaptcha-react": "0.2.13",
"@prosopo/types": "0.2.13",
"@prosopo/common": "0.2.14",
"@prosopo/procaptcha": "0.2.14",
"@prosopo/procaptcha-react": "0.2.14",
"@prosopo/types": "0.2.14",
"@types/react-dom": "^18.2.4",
"electron": "25.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@prosopo/cli": "0.2.13",
"@prosopo/config": "0.2.13",
"@prosopo/cli": "0.2.14",
"@prosopo/config": "0.2.14",
"@types/node": "^20.3.1",
"css-loader": "^6.8.1",
"eslint-config-react-app": "^7.0.1",
Expand Down
6 changes: 3 additions & 3 deletions demos/cypress-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@prosopo/cypress-shared",
"version": "0.2.13",
"version": "0.2.14",
"private": true,
"type": "module",
"engines": {
"node": ">=18",
"npm": "8.9"
},
"dependencies": {
"@prosopo/types": "^0.2.13",
"@prosopo/util": "^0.2.13"
"@prosopo/types": "0.2.14",
"@prosopo/util": "0.2.14"
},
"devDependencies": {
"@cypress/xpath": "^2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion demos/dapp-example/contracts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dapp"
version = "0.2.13"
version = "0.2.14"
authors = [ "Chris Taylor chris@prosopo.io" ]
edition = "2021"

Expand Down
8 changes: 4 additions & 4 deletions demos/provider-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/provider-mock",
"version": "0.2.13",
"version": "0.2.14",
"author": "PROSOPO LIMITED <info@prosopo.io>",
"license": "Apache-2.0",
"main": "./dist/index.js",
Expand All @@ -14,9 +14,9 @@
"build": "tsc --build --verbose tsconfig.json"
},
"dependencies": {
"@prosopo/cli": "0.2.13",
"@prosopo/common": "0.2.13",
"@prosopo/types": "0.2.13",
"@prosopo/cli": "0.2.14",
"@prosopo/common": "0.2.14",
"@prosopo/types": "0.2.14",
"es-main": "^1.3.0",
"express": "^4.18.1"
},
Expand Down
8 changes: 4 additions & 4 deletions dev/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/config",
"version": "0.2.13",
"version": "0.2.14",
"description": "Prosopo config library",
"main": "./dist/index.js",
"type": "module",
Expand All @@ -17,14 +17,14 @@
"author": "Prosopo Limited",
"license": "Apache-2.0",
"dependencies": {
"@prosopo/common": "0.2.13",
"@prosopo/types": "0.2.13",
"@prosopo/common": "0.2.14",
"@prosopo/types": "0.2.14",
"glob": "^10.0.0",
"path-scurry": "^1.10.0"
},
"devDependencies": {
"@polkadot/dev": "^0.76.11",
"@prosopo/util": "0.2.13",
"@prosopo/util": "0.2.14",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.1.0",
Expand Down
42 changes: 21 additions & 21 deletions dev/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/scripts",
"version": "0.2.13",
"version": "0.2.14",
"description": "Dev scripts for working with prosopo packages",
"main": "dist/index.js",
"type": "module",
Expand All @@ -25,26 +25,26 @@
"@polkadot/api-contract": "10.10.1",
"@polkadot/types": "10.10.1",
"@polkadot/util-crypto": "12.5.1",
"@prosopo/api": "0.2.13",
"@prosopo/cli": "0.2.13",
"@prosopo/common": "0.2.13",
"@prosopo/config": "0.2.13",
"@prosopo/contract": "0.2.13",
"@prosopo/database": "0.2.13",
"@prosopo/datasets": "0.2.13",
"@prosopo/datasets-fs": "0.2.13",
"@prosopo/env": "0.2.13",
"@prosopo/file-server": "0.2.13",
"@prosopo/procaptcha": "0.2.13",
"@prosopo/procaptcha-bundle": "0.2.13",
"@prosopo/procaptcha-react": "0.2.13",
"@prosopo/provider": "0.2.13",
"@prosopo/server": "0.2.13",
"@prosopo/types": "0.2.13",
"@prosopo/types-database": "0.2.13",
"@prosopo/types-env": "0.2.13",
"@prosopo/captcha-contract": "0.2.13",
"@prosopo/util": "0.2.13",
"@prosopo/api": "0.2.14",
"@prosopo/cli": "0.2.14",
"@prosopo/common": "0.2.14",
"@prosopo/config": "0.2.14",
"@prosopo/contract": "0.2.14",
"@prosopo/database": "0.2.14",
"@prosopo/datasets": "0.2.14",
"@prosopo/datasets-fs": "0.2.14",
"@prosopo/env": "0.2.14",
"@prosopo/file-server": "0.2.14",
"@prosopo/procaptcha": "0.2.14",
"@prosopo/procaptcha-bundle": "0.2.14",
"@prosopo/procaptcha-react": "0.2.14",
"@prosopo/provider": "0.2.14",
"@prosopo/server": "0.2.14",
"@prosopo/types": "0.2.14",
"@prosopo/types-database": "0.2.14",
"@prosopo/types-env": "0.2.14",
"@prosopo/captcha-contract": "0.2.14",
"@prosopo/util": "0.2.14",
"consola": "^3.2.3",
"dotenv": "^16.0.3",
"es-main": "^1.2.0",
Expand Down
19 changes: 15 additions & 4 deletions dev/scripts/src/scripts/setVersion.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { getLogLevel, getLogger } from '@prosopo/common'
import { getPaths } from '@prosopo/config'
import { loadEnv } from '@prosopo/cli'
import { parse, stringify } from '@iarna/toml'
import fs from 'fs'
import path from 'path'

const log = getLogger(getLogLevel(), 'setVersion')
// We have to load env here if we're importing this file from cli/index.ts, otherwise, the env is loaded after the
// logger is created
loadEnv()
const logLevel = getLogLevel()
const log = getLogger(logLevel, 'setVersion')
log.info('Log level:', logLevel)

const parseVersion = (version: string) => {
try {
Expand Down Expand Up @@ -45,10 +51,11 @@ const find = (pth: string, filter: (pth: string) => boolean): string[] => {
}

export default async function setVersion(version: string, ignore?: string[]) {
log.info('setting version to ', version)
log.info('Setting version to ', version)
version = parseVersion(version)
const root = getPaths().root
const ignorePaths = ['node_modules'].concat(ignore ?? [])
const ignorePaths = ['node_modules', 'cargo-cache', ...(ignore ?? [])]
log.debug('Ignoring paths: ', ignorePaths)
// walk through all files finding .json or .toml
const files = find(root, (pth) => {
// ignore node_modules and any user specified paths
Expand Down Expand Up @@ -78,7 +85,7 @@ export default async function setVersion(version: string, ignore?: string[]) {
]) {
// detect any prosopo dependencies
for (const key of Object.keys(obj)) {
if (key.startsWith('@prosopo')) {
if (key.startsWith('@prosopo') && !key.includes('typechain')) {
// and replace version
log.debug(`setting ${key} to ${version} in ${pth}`)
obj[key] = version
Expand All @@ -91,6 +98,10 @@ export default async function setVersion(version: string, ignore?: string[]) {
// replace version in tomls
files
.filter((pth) => path.extname(pth) === '.toml')
.filter((pth) => {
// ignore node_modules and any user specified paths
return !ignorePaths.some((ignorePath) => pth.includes(ignorePath))
})
.forEach((pth) => {
log.debug('setting version in', pth)
const content = fs.readFileSync(pth, 'utf8')
Expand Down
Loading

0 comments on commit f18d266

Please sign in to comment.