@atlaskit/form 12.2.1 → 12.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 12.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`543068f818b30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/543068f818b30) -
8
+ Remove unused internal invariant for the field component.
9
+
3
10
  ## 12.2.1
4
11
 
5
12
  ### Patch Changes
package/dist/cjs/field.js CHANGED
@@ -14,7 +14,6 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
16
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
- var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
18
17
  var _useId = require("@atlaskit/ds-lib/use-id");
19
18
  var _fieldIdContext = require("./field-id-context");
20
19
  var _form = require("./form");
@@ -118,9 +117,6 @@ function Field(props) {
118
117
  setState = _useState2[1];
119
118
  var latestStateRef = usePreviousRef(state);
120
119
  (0, _react.useEffect)(function () {
121
- if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
122
- (0, _tinyInvariant.default)(latestPropsRef.current.name, '@atlaskit/form: Field components have a required name prop');
123
- }
124
120
  function fieldStateToMeta() {
125
121
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
126
122
  return {
@@ -3,7 +3,6 @@ import "./field.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useContext, useEffect, useMemo, useRef, useState } from 'react';
6
- import invariant from 'tiny-invariant';
7
6
  import { useId } from '@atlaskit/ds-lib/use-id';
8
7
  import { FieldId } from './field-id-context';
9
8
  import { FormContext, IsDisabledContext } from './form';
@@ -102,9 +101,6 @@ export default function Field(props) {
102
101
  });
103
102
  const latestStateRef = usePreviousRef(state);
104
103
  useEffect(() => {
105
- if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
106
- invariant(latestPropsRef.current.name, '@atlaskit/form: Field components have a required name prop');
107
- }
108
104
  function fieldStateToMeta(value = {}) {
109
105
  return {
110
106
  dirty: value.dirty || false,
package/dist/esm/field.js CHANGED
@@ -8,7 +8,6 @@ import { ax, ix } from "@compiled/react/runtime";
8
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
10
  import { useContext, useEffect, useMemo, useRef, useState } from 'react';
11
- import invariant from 'tiny-invariant';
12
11
  import { useId } from '@atlaskit/ds-lib/use-id';
13
12
  import { FieldId } from './field-id-context';
14
13
  import { FormContext, IsDisabledContext } from './form';
@@ -109,9 +108,6 @@ export default function Field(props) {
109
108
  setState = _useState2[1];
110
109
  var latestStateRef = usePreviousRef(state);
111
110
  useEffect(function () {
112
- if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
113
- invariant(latestPropsRef.current.name, '@atlaskit/form: Field components have a required name prop');
114
- }
115
111
  function fieldStateToMeta() {
116
112
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
117
113
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "12.2.1",
3
+ "version": "12.2.2",
4
4
  "description": "A form allows users to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,8 +36,7 @@
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "final-form": "^4.20.3",
38
38
  "final-form-focus": "^1.1.2",
39
- "lodash": "^4.17.21",
40
- "tiny-invariant": "^1.2.0"
39
+ "lodash": "^4.17.21"
41
40
  },
42
41
  "peerDependencies": {
43
42
  "react": "^18.2.0"
@@ -55,7 +54,7 @@
55
54
  "@atlaskit/link": "^3.2.0",
56
55
  "@atlaskit/lozenge": "^13.0.0",
57
56
  "@atlaskit/modal-dialog": "^14.3.0",
58
- "@atlaskit/radio": "^8.2.0",
57
+ "@atlaskit/radio": "^8.3.0",
59
58
  "@atlaskit/range": "^9.2.0",
60
59
  "@atlaskit/section-message": "^8.6.0",
61
60
  "@atlaskit/select": "^21.2.0",