Skip to content

Commit

Permalink
chore: change package scope name to rustresult
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanwww committed Nov 9, 2024
1 parent a699778 commit 8e7a4b3
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 50 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"packageManager": "[email protected]+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",
Expand Down
4 changes: 2 additions & 2 deletions packages/json-serializr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion packages/json-serializr/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @result/json-serializr
# @rustresult/json-serializr
6 changes: 3 additions & 3 deletions packages/json-serializr/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions packages/json-serializr/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/json-serializr/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/json/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion packages/json/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @result/json
# @rustresult/json
6 changes: 3 additions & 3 deletions packages/json/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/json/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/json/src/index.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
10 changes: 5 additions & 5 deletions packages/result/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/result/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @result/result
# @rustresult/result
2 changes: 1 addition & 1 deletion packages/result/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@result/result",
"name": "@rustresult/result",
"version": "0.6.0-alpha",
"description": "Rust-like Result for Javascript",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CHANGELOG
## @result/typeorm v0.6.0 (Unreleased)
## @rustresult/typeorm v0.6.0 (Unreleased)
### Features

Add TypeORM helpers:
Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @result/typeorm
# @rustresult/typeorm
6 changes: 3 additions & 3 deletions packages/typeorm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/typeorm/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

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

8 changes: 4 additions & 4 deletions rustlike-result.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Expand Down
7 changes: 6 additions & 1 deletion scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e7a4b3

Please sign in to comment.