Skip to content
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

Deprecate uniforms-bridge-simple-schema package #1323

Merged
merged 5 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"overrides": [
{
"files": ["**/__mocks__/**/*", "**/__tests__/**/*"],
"files": ["**/__tests__/**/*"],
"env": {
"jest": true
}
Expand Down Expand Up @@ -72,7 +72,6 @@
"valid-jsdoc": "off"
},
"settings": {
"import/core-modules": ["meteor/aldeed:simple-schema", "meteor/check"],
"import/resolver": {
"typescript": {}
},
Expand Down
5 changes: 0 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- packages/uniforms-bridge-graphql/**/*
- packages/uniforms-bridge-json-schema/**/*
- packages/uniforms-bridge-simple-schema-2/**/*
- packages/uniforms-bridge-simple-schema/**/*
- packages/uniforms-bridge-zod/**/*
'Area: Core':
- changed-files:
Expand Down Expand Up @@ -58,10 +57,6 @@
- changed-files:
- any-glob-to-any-file:
- packages/uniforms-bridge-json-schema/**/*
'Bridge: SimpleSchema':
- changed-files:
- any-glob-to-any-file:
- packages/uniforms-bridge-simple-schema/**/*
'Bridge: SimpleSchema (v2)':
- changed-files:
- any-glob-to-any-file:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
- **Integrations with various schemas:**
- **[JSON Schema](http://json-schema.org/)**
- **[GraphQL](https://github.com/graphql/graphql-js)**
- **[SimpleSchema](https://github.com/aldeed/meteor-simple-schema)**
- **[SimpleSchema@2](https://github.com/aldeed/node-simple-schema)**
- **[Zod](https://github.com/colinhacks/zod)**
- **And any other - only [a small wrapper](https://vazco.github.io/uniforms/#/introduction) is needed!**
Expand Down
33 changes: 21 additions & 12 deletions docs/api-bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ Currently available bridges:
- `GraphQLBridge` in `uniforms-bridge-graphql` ([schema documentation](https://graphql.org/))
- `JSONSchemaBridge` in `uniforms-bridge-json-schema` ([schema documentation](https://json-schema.org/))
- `SimpleSchema2Bridge` in `uniforms-bridge-simple-schema-2` ([schema documentation](https://github.com/longshotlabs/simpl-schema#readme))
- `SimpleSchemaBridge` in `uniforms-bridge-simple-schema` ([schema documentation](https://github.com/Meteor-Community-Packages/meteor-simple-schema/blob/master/DOCS.md))
- `ZodBridge` in `uniforms-bridge-zod` ([schema documentation](https://zod.dev/))

Deprecated bridges:

- `SimpleSchemaBridge` in `uniforms-bridge-simple-schema` ([schema documentation](https://github.com/Meteor-Community-Packages/meteor-simple-schema/blob/master/DOCS.md))

If you see a lot of [`Warning: Unknown props...`](https://fb.me/react-unknown-prop) logs, check if your schema or theme doesn't provide extra props. If so, consider [registering it with `filterDOMProps`](/docs/api-helpers#filterdomprops).

## `GraphQLBridge`
Expand Down Expand Up @@ -226,8 +229,25 @@ const schema = new SimpleSchema({
const bridge = new SimpleSchema2Bridge({ schema });
```

## `ZodBridge`

```tsx
import ZodBridge from 'uniforms-bridge-zod';
import z from 'zod';

const schema = z.object({ aboutMe: z.string() });

const bridge = new ZodBridge({ schema });
```

## `SimpleSchemaBridge`

:::caution

SimpleSchemaBridge is deprecated since uniforms v4.

:::

```tsx
import SimpleSchemaBridge from 'uniforms-bridge-simple-schema';
import { SimpleSchema } from 'aldeed:simple-schema';
Expand All @@ -248,14 +268,3 @@ const schema = new SimpleSchema({

const bridge = new SimpleSchemaBridge({ schema });
```

## `ZodBridge`

```tsx
import ZodBridge from 'uniforms-bridge-zod';
import z from 'zod';

const schema = z.object({ aboutMe: z.string() });

const bridge = new ZodBridge({ schema });
```
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ module.exports = {
collectCoverageFrom: ['packages/*/src/*.{ts,tsx}'],
coverageReporters: ['html', 'lcovonly', 'text-summary'],
moduleNameMapper: {
'^meteor/([^:]*):(.*)$':
'<rootDir>/packages/uniforms/__mocks__/meteor/$1_$2.ts',
'^meteor/([^:]*)$': '<rootDir>/packages/uniforms/__mocks__/meteor/$1.ts',
'^simpl-schema$': '<rootDir>/node_modules/simpl-schema',
'^uniforms/__suites__$': '<rootDir>/packages/uniforms/__suites__',
'^uniforms([^/]*)(.*)$': '<rootDir>/packages/uniforms$1/src$2',
Expand Down
11 changes: 0 additions & 11 deletions packages/uniforms-bridge-simple-schema/README.md

This file was deleted.

Loading
Loading