Skip to content

Commit

Permalink
Deprecate uniforms-bridge-simple-schema package (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpospiech authored Jun 3, 2024
1 parent 5667df5 commit d2b924a
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 726 deletions.
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 @@ -3,7 +3,6 @@
- any-glob-to-any-file:
- 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 @@ -53,10 +52,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 @@ -50,7 +50,6 @@
- **Inline and asynchronous form validation**
- **Integrations with various schemas:**
- **[JSON Schema](http://json-schema.org/)**
- **[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
21 changes: 19 additions & 2 deletions docs/api-bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Currently available bridges:

- `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 packages:
Deprecated bridges:

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

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).
Expand Down Expand Up @@ -141,8 +141,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 Down
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

0 comments on commit d2b924a

Please sign in to comment.