@atlaskit/adf-schema 52.6.3 → 52.6.4

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/adf-schema
2
2
 
3
+ ## 52.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4175fc4bd57f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4175fc4bd57f5) -
8
+ Fix bug in linkify util which extracts URLs from text strings
9
+
3
10
  ## 52.6.3
4
11
 
5
12
  ### Patch Changes
@@ -9,6 +9,7 @@ exports.getLinkMatch = getLinkMatch;
9
9
  exports.isRootRelative = isRootRelative;
10
10
  exports.linkifyMatch = exports.linkify = exports.isSafeUrl = void 0;
11
11
  exports.normalizeUrl = normalizeUrl;
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _linkifyIt = _interopRequireDefault(require("linkify-it"));
13
14
  /**
14
15
  * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
@@ -84,7 +85,7 @@ var linkifyMatch = exports.linkifyMatch = function linkifyMatch(text) {
84
85
  text: link,
85
86
  schema: ''
86
87
  });
87
- startpos += end;
88
+ startpos = (0, _platformFeatureFlags.fg)('platform_editor_linkify-text-improvement') ? end : startpos + end;
88
89
  substr = text.substr(startpos);
89
90
  } else {
90
91
  break;
@@ -4,6 +4,7 @@
4
4
  * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
5
5
  * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
6
6
  */
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import LinkifyIt from 'linkify-it';
8
9
  const whitelistedURLPatterns = [/^https?:\/\//imu, /^ftps?:\/\//imu, /^gopher:\/\//imu, /^integrity:\/\//imu, /^file:\/\//imu, /^smb:\/\//imu, /^dynamicsnav:\/\//imu, /^jamfselfservice:\/\//imu, /^\//imu, /^mailto:/imu, /^skype:/imu, /^callto:/imu, /^facetime:/imu, /^git:/imu, /^irc6?:/imu, /^news:/imu, /^nntp:/imu, /^feed:/imu, /^cvs:/imu, /^svn:/imu, /^mvn:/imu, /^ssh:/imu, /^scp:\/\//imu, /^sftp:\/\//imu, /^itms:/imu,
9
10
  // This is not a valid notes link, but we support this pattern for backwards compatibility
@@ -70,7 +71,7 @@ export const linkifyMatch = text => {
70
71
  text: link,
71
72
  schema: ''
72
73
  });
73
- startpos += end;
74
+ startpos = fg('platform_editor_linkify-text-improvement') ? end : startpos + end;
74
75
  substr = text.substr(startpos);
75
76
  } else {
76
77
  break;
@@ -4,6 +4,7 @@
4
4
  * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
5
5
  * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
6
6
  */
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import LinkifyIt from 'linkify-it';
8
9
  var whitelistedURLPatterns = [/^http[s\u017F]?:\/\//im, /^ftp[s\u017F]?:\/\//im, /^gopher:\/\//im, /^integrity:\/\//im, /^file:\/\//im, /^[s\u017F]mb:\/\//im, /^dynamic[s\u017F]nav:\/\//im, /^jamf[s\u017F]elf[s\u017F]ervice:\/\//im, /^\//im, /^mailto:/im, /^[s\u017F][k\u212A]ype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^new[s\u017F]:/im, /^nntp:/im, /^feed:/im, /^cv[s\u017F]:/im, /^[s\u017F]vn:/im, /^mvn:/im, /^[s\u017F][s\u017F]h:/im, /^[s\u017F]cp:\/\//im, /^[s\u017F]ftp:\/\//im, /^itm[s\u017F]:/im,
9
10
  // This is not a valid notes link, but we support this pattern for backwards compatibility
@@ -72,7 +73,7 @@ export var linkifyMatch = function linkifyMatch(text) {
72
73
  text: link,
73
74
  schema: ''
74
75
  });
75
- startpos += end;
76
+ startpos = fg('platform_editor_linkify-text-improvement') ? end : startpos + end;
76
77
  substr = text.substr(startpos);
77
78
  } else {
78
79
  break;
@@ -1,9 +1,3 @@
1
- /**
2
- * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
3
- * Any changes made here should be mirrored there.
4
- * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
5
- * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
6
- */
7
1
  import LinkifyIt from 'linkify-it';
8
2
  /**
9
3
  * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
@@ -1,9 +1,3 @@
1
- /**
2
- * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
3
- * Any changes made here should be mirrored there.
4
- * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
5
- * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
6
- */
7
1
  import LinkifyIt from 'linkify-it';
8
2
  /**
9
3
  * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "52.6.3",
3
+ "version": "52.6.4",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,6 +42,7 @@
42
42
  "dependencies": {
43
43
  "@atlaskit/adf-schema-generator": "^2.2.0",
44
44
  "@atlaskit/editor-prosemirror": "^7.3.0",
45
+ "@atlaskit/platform-feature-flags": "^1.1.0",
45
46
  "@atlaskit/tmp-editor-statsig": "^71.0.0",
46
47
  "@babel/runtime": "^7.0.0",
47
48
  "css-color-names": "0.0.4",
@@ -86,5 +87,10 @@
86
87
  "ts-node": "^10.9.1",
87
88
  "typescript": "5.9.2"
88
89
  },
89
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
90
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
91
+ "platform-feature-flags": {
92
+ "platform_editor_linkify-text-improvement": {
93
+ "type": "boolean"
94
+ }
95
+ }
90
96
  }