@atlaskit/editor-plugin-type-ahead 12.1.10 → 12.1.12

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,19 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 12.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c2986ab2c7a01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2986ab2c7a01) -
8
+ Cleans up prefer static regex violations and enables e18e rule
9
+ - Updated dependencies
10
+
11
+ ## 12.1.11
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 12.1.10
4
18
 
5
19
  ### Patch Changes
package/compass.yml CHANGED
@@ -24,6 +24,9 @@ customFields:
24
24
  - name: Department
25
25
  type: text
26
26
  value: Eng - Editor Frontend Platform
27
+ - name: Trusted Reviewer Teams
28
+ type: text
29
+ value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
27
30
  - name: Technical Owner
28
31
  type: user
29
32
  value: ari:cloud:identity::user/5ea93c14a4c57d0b8bd65a16 # Anand Raj
@@ -18,6 +18,9 @@ var _decorations = require("./decorations");
18
18
  var _isInsertionTransaction = require("./isInsertionTransaction");
19
19
  var _key = require("./key");
20
20
  var _reducer = require("./reducer");
21
+ // Ignored via go/ees005
22
+ // eslint-disable-next-line require-unicode-regexp
23
+ var ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
21
24
  var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
22
25
  var steps = tr.steps.filter(function (step) {
23
26
  return step instanceof _steps.InsertTypeAheadStep;
@@ -154,9 +157,7 @@ function createPlugin(_ref) {
154
157
  // data='/') would cause the Enter-confirm to open the typeahead.
155
158
  // Matches any single ASCII character (U+0000–U+007F).
156
159
  // No 'u' flag needed for ASCII-only ranges.
157
- // Ignored via go/ees005
158
- // eslint-disable-next-line require-unicode-regexp
159
- if (/^[\x00-\x7F]$/.test(pendingData)) {
160
+ if (ASCII_CHAR_REGEX.test(pendingData)) {
160
161
  return false;
161
162
  }
162
163
  var pattern = new RegExp("^(".concat(handler.customRegex, ")$"), 'u');
@@ -12,6 +12,10 @@ import { factoryDecorations } from './decorations';
12
12
  import { isInsertionTransaction } from './isInsertionTransaction';
13
13
  import { pluginKey } from './key';
14
14
  import { createReducer } from './reducer';
15
+
16
+ // Ignored via go/ees005
17
+ // eslint-disable-next-line require-unicode-regexp
18
+ const ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
15
19
  const hasValidTypeAheadStep = tr => {
16
20
  const steps = tr.steps.filter(step => step instanceof InsertTypeAheadStep);
17
21
 
@@ -148,9 +152,7 @@ export function createPlugin({
148
152
  // data='/') would cause the Enter-confirm to open the typeahead.
149
153
  // Matches any single ASCII character (U+0000–U+007F).
150
154
  // No 'u' flag needed for ASCII-only ranges.
151
- // Ignored via go/ees005
152
- // eslint-disable-next-line require-unicode-regexp
153
- if (/^[\x00-\x7F]$/.test(pendingData)) {
155
+ if (ASCII_CHAR_REGEX.test(pendingData)) {
154
156
  return false;
155
157
  }
156
158
  const pattern = new RegExp(`^(${handler.customRegex})$`, 'u');
@@ -12,6 +12,10 @@ import { factoryDecorations } from './decorations';
12
12
  import { isInsertionTransaction } from './isInsertionTransaction';
13
13
  import { pluginKey } from './key';
14
14
  import { createReducer } from './reducer';
15
+
16
+ // Ignored via go/ees005
17
+ // eslint-disable-next-line require-unicode-regexp
18
+ var ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
15
19
  var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
16
20
  var steps = tr.steps.filter(function (step) {
17
21
  return step instanceof InsertTypeAheadStep;
@@ -148,9 +152,7 @@ export function createPlugin(_ref) {
148
152
  // data='/') would cause the Enter-confirm to open the typeahead.
149
153
  // Matches any single ASCII character (U+0000–U+007F).
150
154
  // No 'u' flag needed for ASCII-only ranges.
151
- // Ignored via go/ees005
152
- // eslint-disable-next-line require-unicode-regexp
153
- if (/^[\x00-\x7F]$/.test(pendingData)) {
155
+ if (ASCII_CHAR_REGEX.test(pendingData)) {
154
156
  return false;
155
157
  }
156
158
  var pattern = new RegExp("^(".concat(handler.customRegex, ")$"), 'u');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "12.1.10",
3
+ "version": "12.1.12",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/primitives": "^20.3.0",
37
37
  "@atlaskit/prosemirror-history": "^1.0.0",
38
38
  "@atlaskit/prosemirror-input-rules": "^4.0.0",
39
- "@atlaskit/tmp-editor-statsig": "^119.0.0",
39
+ "@atlaskit/tmp-editor-statsig": "^120.1.0",
40
40
  "@atlaskit/tokens": "^15.3.0",
41
41
  "@atlaskit/visually-hidden": "^4.1.0",
42
42
  "@babel/runtime": "^7.0.0",
@@ -48,7 +48,7 @@
48
48
  "w3c-keyname": "^2.1.8"
49
49
  },
50
50
  "peerDependencies": {
51
- "@atlaskit/editor-common": "^116.19.0",
51
+ "@atlaskit/editor-common": "^116.21.0",
52
52
  "react": "^18.2.0",
53
53
  "react-dom": "^18.2.0",
54
54
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"