Skip to content
Open
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 load-tests/backend/users-provisioning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@mysten/sui": "^1.36.0",
"better-sqlite3-multiple-ciphers": "^12.2.0",
"dotenv": "^17.2.0",
"hono": "^4.8.5"
"hono": "^4.9.7"
},
"devDependencies": {
"@types/node": "^20.11.17",
Expand Down
16 changes: 8 additions & 8 deletions load-tests/backend/users-provisioning/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/messaging/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changesets

Hello and welcome! This folder was automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos to help version and publish code. You can
find the full documentation for it [in the changesets repository](https://github.com/changesets/changesets).

You can view a list of [common questions](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) to help you get started with changesets.
15 changes: 15 additions & 0 deletions packages/messaging/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "minor",
"privatePackages": false,
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
40 changes: 34 additions & 6 deletions packages/.eslintrc.js → packages/messaging/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
// SPDX-License-Identifier: Apache-2.0

module.exports = {
plugins: ['unused-imports', 'prettier', 'header', 'require-extensions'],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import',
'unused-imports',
'prettier',
'header',
'require-extensions',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
'plugin:prettier/recommended',
'plugin:import/typescript',
],
settings: {
'import/resolver': {
Expand All @@ -16,6 +26,7 @@ module.exports = {
},
env: {
es2020: true,
node: true,
},
root: true,
ignorePatterns: [
Expand All @@ -31,19 +42,29 @@ module.exports = {
'.next',
'generated',
'vite-env.d.ts',
'.eslintrc.js',
'prettier.config.js',
'test/**/*',
'**/*.test.*',
'**/*.spec.*',
'*.config.*',
'vitest.config.*',
'sui-codegen.config.*',
],
rules: {
'prefer-const': 'error',
'no-case-declarations': 'off',
'no-implicit-coercion': [2, { number: true, string: true, boolean: false }],
'@typescript-eslint/no-redeclare': 'off',
'@typescript-eslint/ban-types': [
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/no-restricted-types': [
'error',
{
types: {
Buffer: 'Buffer usage increases bundle size and is not consistently implemented on web.',
},
extendDefaults: true,
},
],
'no-restricted-globals': [
Expand Down Expand Up @@ -71,7 +92,7 @@ module.exports = {
},
overrides: [
{
files: ['messaging/**/*'],
files: ['src/**/*'],
rules: {
'require-extensions/require-extensions': 'error',
'require-extensions/require-index': 'error',
Expand All @@ -80,6 +101,13 @@ module.exports = {
'import/no-cycle': ['error'],
},
},
{
files: ['src/contracts/**/*'],
rules: {
// Generated contract files can use any types and have relaxed rules
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['*.test.*', '*.spec.*'],
rules: {
Expand All @@ -90,7 +118,7 @@ module.exports = {
'import/consistent-type-specifier-style': ['off'],
// Reset to defaults to allow `Buffer` usage in tests (given they run in Node and do not impact bundle):
'no-restricted-globals': ['off'],
'@typescript-eslint/ban-types': ['error'],
'@typescript-eslint/no-restricted-types': ['off'],
},
},
],
Expand Down
29 changes: 29 additions & 0 deletions packages/messaging/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ignore everything by default
# /*
# Enable prettier for apps, dapps and sdk
!/packages

# ignore generated files
/apps/icons/src
npm-debug.log*
package-lock.json
yarn-debug.log*
.next/
.source/
.swc/
build/
coverage/
dist/
out/
generated/
playwright-report/
storybook-static/
CHANGELOG.md
packages/move-bytecode-template/pkg
packages/docs/public/typedoc
packages/walrus-wasm
packages/move-bytecode-template
packages/walrus/src/client
package.json
pnpm-lock.yaml
package_summaries/
18 changes: 18 additions & 0 deletions packages/messaging/genversion.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env node
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

import { readFileSync, writeFileSync } from 'fs';

const packageJson = JSON.parse(readFileSync('./package.json', 'utf8'));

const versionFileContent = `// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// This file is auto-generated. Do not edit directly.
export const PACKAGE_VERSION = '${packageJson.version}';
export const PACKAGE_NAME = '${packageJson.name}';
`;

writeFileSync('./src/version.ts', versionFileContent);
console.log(`Generated version file with version ${packageJson.version}`);
74 changes: 67 additions & 7 deletions packages/messaging/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mysten/sui-stack-messaging-sdk",
"name": "@mysten/messaging",
"version": "0.0.1",
"description": "Messaging SDK",
"description": "Messaging SDK (Alpha - Experimental)",
"license": "Apache-2.0",
"author": "Mysten Labs <[email protected]>",
"type": "commonjs",
Expand All @@ -22,18 +22,23 @@
"scripts": {
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
"build": "node genversion.mjs && build-package",
"build:build-scripts": "turbo run build --filter=@mysten/build-scripts",
"codegen": "sui-ts-codegen generate && pnpm lint:fix",
"codegen:version": "node genversion.mjs",
"vitest": "vitest",
"test": "pnpm test:typecheck && pnpm test:unit",
"test:typecheck": "tsc -p ./test",
"test:unit": "vitest run unit __tests__ || echo 'No unit tests found'",
"test:unit": "vitest run test/unit || echo 'No unit tests found'",
"test:integration": "vitest run test/integration-*.test.ts",
"test:integration:localnet": "TEST_ENVIRONMENT=localnet vitest run test/integration-write.test.ts",
"test:integration:testnet": "TEST_ENVIRONMENT=testnet vitest run test/integration-*.test.ts",
"test:e2e": "turbo run test:e2e --concurrency=1",
"changeset-version": "pnpm changeset version && node genversion.mjs",
"alpha:enter": "pnpm changeset pre enter alpha",
"alpha:exit": "pnpm changeset pre exit",
"prepublishOnly": "pnpm turbo build",
"prettier:check": "prettier -c --ignore-unknown .",
"prettier:fix": "prettier -w --ignore-unknown .",
"prettier:fix:watch": "onchange '**' -i -f add -f change -j 5 -- prettier -w --ignore-unknown {{file}}",
"eslint:check": "eslint --max-warnings=0 .",
"eslint:fix": "pnpm run eslint:check --fix",
"lint": "pnpm run eslint:check && pnpm run prettier:check",
Expand All @@ -48,7 +53,7 @@
},
"homepage": "https://github.com/MystenLabs/<tbd>#readme",
"dependencies": {
"@mysten/bcs": "^1.7.0",
"@mysten/bcs": "^1.8.0",
"@mysten/seal": "^0.6.0",
"@mysten/sui": "^1.38.0",
"@mysten/sui-grpc": "^0.1.0",
Expand All @@ -62,6 +67,61 @@
"@types/node": "^24.3.0",
"testcontainers": "^11.5.1",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
}
"vitest": "^3.2.4",
"@changesets/cli": "^2.29.6",
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@manypkg/cli": "^0.25.1",
"@tanstack/eslint-plugin-query": "^5.81.2",
"@testcontainers/postgresql": "^11.4.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"concurrently": "^9.2.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-require-extensions": "^0.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-unused-imports": "^3.0.0",
"graphql-config": "^5.1.5",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"tsx": "^4.20.3",
"turbo": "^2.5.6",
"onchange": "^7.1.0"
},
"pnpm": {
"overrides": {
"node-notifier": "10.0.0",
"async": "3.2.2",
"nth-check": "2.0.1",
"yaml@<2.2.2": ">=2.2.2",
"semver@<7.5.2": ">=7.5.2",
"postcss@<8.4.31": ">=8.4.31",
"dompurify@>=3.0.0 <3.1.3": ">=3.1.3",
"[email protected]": "7.0.5",
"[email protected]": "^0.30.0",
"@eslint/plugin-kit@<0.3.3": "0.3.3"
},
"onlyBuiltDependencies": [
"cpu-features",
"esbuild",
"protobufjs",
"ssh2",
"unrs-resolver"
]
},
"engines": {
"pnpm": ">=10.17.0"
},
"manypkg": {
"ignoredRules": [
"INTERNAL_MISMATCH",
"ROOT_HAS_DEV_DEPENDENCIES"
]
},
"packageManager": "[email protected]"
}
Loading