diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db1112c..6ffc9d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,13 +3,13 @@ name: Release on: push: tags: - - '@result/*_v[0-9]+.[0-9]+.[0-9]+' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-alpha' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-beta' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-rc' - - '@result/*_v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-alpha' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-beta' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-rc' + - '@rustresult/*_v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' jobs: release: diff --git a/package.json b/package.json index 727b78e..0d5162e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "packageManager": "pnpm@9.8.0+sha512.8e4c3550fb500e808dbc30bb0ce4dd1eb614e30b1c55245f211591ec2cdf9c611cabd34e1364b42f564bd54b3945ed0f49d61d1bbf2ec9bd74b866fcdc723276", "scripts": { "build": "pnpm run --recursive --stream build", - "build-result": "pnpm run --filter @result/result build", + "build-result": "pnpm run --filter @rustresult/result build", "clean": "pnpm run --recursive --no-sort clean", "format": "pnpm run format:root && pnpm run format:workspaces", "format:workspaces": "pnpm run --recursive --no-sort --stream format", diff --git a/packages/json-serializr/CHANGELOG.md b/packages/json-serializr/CHANGELOG.md index e351c0b..e49b219 100644 --- a/packages/json-serializr/CHANGELOG.md +++ b/packages/json-serializr/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG -## @result/json-serializr v0.6.0 (Unreleased) +## @rustresult/json-serializr v0.6.0 (Unreleased) ### Features -Provides `serializr` helpers to support JSON (de)serialization of `@result/result`: +Provides `serializr` helpers to support JSON (de)serialization of `@rustresult/result`: - `createResultModelSchema` - `resultPropSchema` diff --git a/packages/json-serializr/README.md b/packages/json-serializr/README.md index a356f85..301ed19 100644 --- a/packages/json-serializr/README.md +++ b/packages/json-serializr/README.md @@ -1 +1 @@ -# @result/json-serializr +# @rustresult/json-serializr diff --git a/packages/json-serializr/package.json b/packages/json-serializr/package.json index 0974ba7..b0252dd 100644 --- a/packages/json-serializr/package.json +++ b/packages/json-serializr/package.json @@ -1,7 +1,7 @@ { - "name": "@result/json-serializr", + "name": "@rustresult/json-serializr", "version": "0.6.0-alpha", - "description": "A json (de)serialization implementation using serializr for @result/result", + "description": "A json (de)serialization implementation using serializr for @rustresult/result", "exports": { ".": { "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { - "@result/result": "workspace:0.6.0-alpha", + "@rustresult/result": "workspace:0.6.0-alpha", "serializr": "^3.0.2" }, "devDependencies": { diff --git a/packages/json-serializr/src/__tests__/index.test.ts b/packages/json-serializr/src/__tests__/index.test.ts index 48cc841..7dce2c8 100644 --- a/packages/json-serializr/src/__tests__/index.test.ts +++ b/packages/json-serializr/src/__tests__/index.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from '@jest/globals'; -import type { Result } from '@result/result'; -import { Err, Ok } from '@result/result'; +import type { Result } from '@rustresult/result'; +import { Err, Ok } from '@rustresult/result'; import { createModelSchema, deserialize, list, object, primitive, serialize } from 'serializr'; import { createResultModelSchema, resultPropSchema } from '../index'; diff --git a/packages/json-serializr/src/index.ts b/packages/json-serializr/src/index.ts index cae691e..423bbc3 100644 --- a/packages/json-serializr/src/index.ts +++ b/packages/json-serializr/src/index.ts @@ -1,5 +1,5 @@ -import type { Result, ResultJson } from '@result/result'; -import { Err, Ok, RustlikeResult } from '@result/result'; +import type { Result, ResultJson } from '@rustresult/result'; +import { Err, Ok, RustlikeResult } from '@rustresult/result'; import { SKIP, alias, createModelSchema, custom, raw } from 'serializr'; import type { AdditionalPropArgs, ModelSchema, PropDeserializer, PropSchema, PropSerializer } from 'serializr'; diff --git a/packages/json/CHANGELOG.md b/packages/json/CHANGELOG.md index 73b3b03..396496f 100644 --- a/packages/json/CHANGELOG.md +++ b/packages/json/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG -## @result/json v0.6.0 (Unreleased) +## @rustresult/json v0.6.0 (Unreleased) ### Features -Adds a simple JSON (de)serialization support for `@result/result`: +Adds a simple JSON (de)serialization support for `@rustresult/result`: - `ResultJSON.serialize` - `ResultJSON.deserialize` diff --git a/packages/json/README.md b/packages/json/README.md index ff1e6c8..ba83039 100644 --- a/packages/json/README.md +++ b/packages/json/README.md @@ -1 +1 @@ -# @result/json +# @rustresult/json diff --git a/packages/json/package.json b/packages/json/package.json index 826e223..22148bd 100644 --- a/packages/json/package.json +++ b/packages/json/package.json @@ -1,7 +1,7 @@ { - "name": "@result/json", + "name": "@rustresult/json", "version": "0.6.0-alpha", - "description": "A simple json (de)serialization implementation for @result/result", + "description": "A simple json (de)serialization implementation for @rustresult/result", "exports": { ".": { "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { - "@result/result": "workspace:0.6.0-alpha" + "@rustresult/result": "workspace:0.6.0-alpha" }, "devDependencies": { "@jest/globals": "^29.7.0", diff --git a/packages/json/src/__tests__/index.test.ts b/packages/json/src/__tests__/index.test.ts index f1eb562..0a37dd0 100644 --- a/packages/json/src/__tests__/index.test.ts +++ b/packages/json/src/__tests__/index.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from '@jest/globals'; -import { Err, Ok } from '@result/result'; +import { Err, Ok } from '@rustresult/result'; import { ResultJSON } from '../index'; diff --git a/packages/json/src/index.ts b/packages/json/src/index.ts index 9c1e44d..c5770db 100644 --- a/packages/json/src/index.ts +++ b/packages/json/src/index.ts @@ -1,5 +1,5 @@ -import type { Result, ResultJson } from '@result/result'; -import { Err, Ok, RustlikeResult } from '@result/result'; +import type { Result, ResultJson } from '@rustresult/result'; +import { Err, Ok, RustlikeResult } from '@rustresult/result'; /** * Converts a `Result` to a JSON object. diff --git a/packages/result/CHANGELOG.md b/packages/result/CHANGELOG.md index 673ec1f..fdd7873 100644 --- a/packages/result/CHANGELOG.md +++ b/packages/result/CHANGELOG.md @@ -1,16 +1,16 @@ # CHANGELOG -## @result/result v0.6.0 (Unreleased) +## @rustresult/result v0.6.0 (Unreleased) ### Breaking Changes -Change package name to `@result/result`. +Change package name to `@rustresult/result`. -The following functions are moved to `@result/json` package: +The following functions are moved to `@rustresult/json` package: - `ResultJSON.serialize` - `ResultJSON.deserialize` -The following functions are moved to `@result/json-serializr` package: +The following functions are moved to `@rustresult/json-serializr` package: - `createResultModelSchema` - `resultPropSchema` -The following functions are moved to `@result/typeorm` package: +The following functions are moved to `@rustresult/typeorm` package: - `typeormTransaction` ## rustlike-result v0.5.1 (2024-10-28) diff --git a/packages/result/README.md b/packages/result/README.md index b603f44..c58e806 100644 --- a/packages/result/README.md +++ b/packages/result/README.md @@ -1 +1 @@ -# @result/result +# @rustresult/result diff --git a/packages/result/package.json b/packages/result/package.json index 82dcd75..09e53f7 100644 --- a/packages/result/package.json +++ b/packages/result/package.json @@ -1,5 +1,5 @@ { - "name": "@result/result", + "name": "@rustresult/result", "version": "0.6.0-alpha", "description": "Rust-like Result for Javascript", "exports": { diff --git a/packages/typeorm/CHANGELOG.md b/packages/typeorm/CHANGELOG.md index deb3aca..051fcc2 100644 --- a/packages/typeorm/CHANGELOG.md +++ b/packages/typeorm/CHANGELOG.md @@ -1,5 +1,5 @@ # CHANGELOG -## @result/typeorm v0.6.0 (Unreleased) +## @rustresult/typeorm v0.6.0 (Unreleased) ### Features Add TypeORM helpers: diff --git a/packages/typeorm/README.md b/packages/typeorm/README.md index 6c64526..65186cb 100644 --- a/packages/typeorm/README.md +++ b/packages/typeorm/README.md @@ -1 +1 @@ -# @result/typeorm +# @rustresult/typeorm diff --git a/packages/typeorm/package.json b/packages/typeorm/package.json index b84fc62..fb5978e 100644 --- a/packages/typeorm/package.json +++ b/packages/typeorm/package.json @@ -1,7 +1,7 @@ { - "name": "@result/typeorm", + "name": "@rustresult/typeorm", "version": "0.6.0-alpha", - "description": "A TypeORM toolkit for @result/result", + "description": "A TypeORM toolkit for @rustresult/result", "exports": { ".": { "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ "typecheck": "tsc --project tsconfig.json --noEmit --incremental false" }, "dependencies": { - "@result/result": "workspace:0.6.0-alpha", + "@rustresult/result": "workspace:0.6.0-alpha", "typeorm": "^0.3.0" }, "devDependencies": { diff --git a/packages/typeorm/src/__tests__/index.test.ts b/packages/typeorm/src/__tests__/index.test.ts index 5cda281..729aa09 100644 --- a/packages/typeorm/src/__tests__/index.test.ts +++ b/packages/typeorm/src/__tests__/index.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, jest } from '@jest/globals'; -import { Err, ErrAsync, Ok, OkAsync } from '@result/result'; +import { Err, ErrAsync, Ok, OkAsync } from '@rustresult/result'; import type { DataSource, EntityManager, QueryRunner } from 'typeorm'; import type { IsolationLevel } from 'typeorm/driver/types/IsolationLevel'; diff --git a/packages/typeorm/src/index.ts b/packages/typeorm/src/index.ts index 8d3ac86..be3d64c 100644 --- a/packages/typeorm/src/index.ts +++ b/packages/typeorm/src/index.ts @@ -1,5 +1,5 @@ -import { Err, fromPromiseableResult } from '@result/result'; -import type { Result, ResultAsync } from '@result/result'; +import { Err, fromPromiseableResult } from '@rustresult/result'; +import type { Result, ResultAsync } from '@rustresult/result'; import type { DataSource, EntityManager } from 'typeorm'; import type { IsolationLevel } from 'typeorm/driver/types/IsolationLevel'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cff448b..c8a3f6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,7 +35,7 @@ importers: packages/json: dependencies: - '@result/result': + '@rustresult/result': specifier: workspace:0.6.0-alpha version: link:../result devDependencies: @@ -87,7 +87,7 @@ importers: packages/json-serializr: dependencies: - '@result/result': + '@rustresult/result': specifier: workspace:0.6.0-alpha version: link:../result serializr: @@ -190,7 +190,7 @@ importers: packages/typeorm: dependencies: - '@result/result': + '@rustresult/result': specifier: workspace:0.6.0-alpha version: link:../result typeorm: diff --git a/rustlike-result.code-workspace b/rustlike-result.code-workspace index a0cf24f..b1e6514 100644 --- a/rustlike-result.code-workspace +++ b/rustlike-result.code-workspace @@ -48,19 +48,19 @@ "path": "." }, { - "name": "@result/result", + "name": "@rustresult/result", "path": "packages/result" }, { - "name": "@result/json", + "name": "@rustresult/json", "path": "packages/json" }, { - "name": "@result/json-serializr", + "name": "@rustresult/json-serializr", "path": "packages/json-serializr" }, { - "name": "@result/typeorm", + "name": "@rustresult/typeorm", "path": "packages/typeorm" } ] diff --git a/scripts/release.mjs b/scripts/release.mjs index 66c410f..a42c8bd 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -19,7 +19,12 @@ function getNpmTag(prerelease) { } } -const ALLOWED_PACKAGE_NAMES = ['@result/json', '@result/json-serializr', '@result/result', '@result/typeorm']; +const ALLOWED_PACKAGE_NAMES = [ + '@rustresult/json', + '@rustresult/json-serializr', + '@rustresult/result', + '@rustresult/typeorm', +]; function release() { // This environment variable is injected in Github Actions