Skip to content

Rename ReScript Schema to Sury #1831

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
* [parse-dont-validate](https://github.com/Packer-Man/parse-dont-validate)
* [Paseri](https://github.com/vbudovski/paseri)
* [r-assign](https://github.com/micnic/r-assign)
* [rescript-schema](https://github.com/DZakh/rescript-schema)
* [rulr](https://github.com/ryansmith94/rulr)
* [runtypes](https://github.com/pelotom/runtypes)
* [@sapphire/shapeshift](https://github.com/sapphiredev/shapeshift)
Expand All @@ -51,6 +50,7 @@
* [succulent](https://github.com/aslilac/succulent)
* [superstruct](https://github.com/ianstormtaylor/superstruct)
* [suretype](https://github.com/grantila/suretype)
* [sury](https://github.com/DZakh/sury)
* [tiny-schema-validator](https://github.com/5alidz/tiny-schema-validator)
* [to-typed](https://github.com/jsoldi/to-typed)
* [toi](https://github.com/hf/toi)
Expand Down
2 changes: 1 addition & 1 deletion cases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const cases = [
'pure-parse',
'purify-ts',
'r-assign',
'rescript-schema',
'rulr',
'runtypes',
'sapphire-shapeshift',
Expand All @@ -38,6 +37,7 @@ export const cases = [
'succulent',
'superstruct',
'suretype',
'sury',
'tiny-schema-validator',
'to-typed',
'toi',
Expand Down
10 changes: 5 additions & 5 deletions cases/rescript-schema.ts → cases/sury.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as S from 'rescript-schema';
import * as S from 'sury';

import { createCase } from '../benchmarks';

Expand All @@ -20,29 +20,29 @@ const schema = S.schema({
},
});

createCase('rescript-schema', 'parseSafe', () => {
createCase('sury', 'parseSafe', () => {
const parseSafe = S.compile(schema, 'Any', 'Output', 'Sync');
return data => {
return parseSafe(data);
};
});

createCase('rescript-schema', 'parseStrict', () => {
createCase('sury', 'parseStrict', () => {
const parseStrict = S.compile(S.deepStrict(schema), 'Any', 'Output', 'Sync');
return data => {
return parseStrict(data);
};
});

createCase('rescript-schema', 'assertLoose', () => {
createCase('sury', 'assertLoose', () => {
const assertLoose = S.compile(schema, 'Any', 'Assert', 'Sync');
return data => {
assertLoose(data)!;
return true;
};
});

createCase('rescript-schema', 'assertStrict', () => {
createCase('sury', 'assertStrict', () => {
const assertStrict = S.compile(S.deepStrict(schema), 'Any', 'Assert', 'Sync');
return data => {
assertStrict(data)!;
Expand Down
2 changes: 1 addition & 1 deletion download-packages-popularity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const packages = [
packageName: 'r-assign',
},
{
name: 'rescript-schema',
name: 'sury',
packageName: 'rescript-schema',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept it as rescript-schema for now. I'll update it later when users migrate to sury

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhh okay.

From my POV it maybe would have been cleaner then to just add sury as a new library to the benchmark and remove rescript-schema once the migration is done.

Could you maybe please add a comment though in case someone wonders about the naming mismatch 😁 ? thx!

},
{
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"purify-ts": "2.1.0",
"r-assign": "1.9.0",
"reflect-metadata": "0.2.2",
"rescript-schema": "9.2.2",
"sury": "10.0.0-rc.0",
"rulr": "10.7.1",
"runtypes": "6.7.0",
"serve": "14.2.4",
Expand Down
2 changes: 1 addition & 1 deletion test/benchmarks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import '../cases/paseri';
import '../cases/pure-parse';
import '../cases/purify-ts';
import '../cases/r-assign';
import '../cases/rescript-schema';
import '../cases/sury';
import '../cases/rulr';
import '../cases/runtypes';
import '../cases/sapphire-shapeshift';
Expand Down
Loading