@atlaskit/editor-plugins 10.2.24 → 10.2.25

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,11 @@
1
1
  # @atlaskit/editor-plugins
2
2
 
3
+ ## 10.2.25
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 10.2.24
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugins",
3
- "version": "10.2.24",
3
+ "version": "10.2.25",
4
4
  "description": "A convenience facade package that exposes all @atlaskit/editor-plugin-* plugins so that users can add this package without having to manually add all their plugins",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,103 +29,103 @@
29
29
  "update-editor-plugins": "run-ts scripts/update-editor-plugins.ts"
30
30
  },
31
31
  "dependencies": {
32
- "@atlaskit/editor-plugin-accessibility-utils": "3.0.6",
33
- "@atlaskit/editor-plugin-alignment": "4.2.12",
34
- "@atlaskit/editor-plugin-analytics": "3.0.6",
35
- "@atlaskit/editor-plugin-annotation": "3.3.14",
36
- "@atlaskit/editor-plugin-avatar-group": "4.1.9",
37
- "@atlaskit/editor-plugin-base": "4.1.8",
38
- "@atlaskit/editor-plugin-batch-attribute-updates": "3.0.6",
39
- "@atlaskit/editor-plugin-before-primary-toolbar": "3.0.2",
40
- "@atlaskit/editor-plugin-better-type-history": "3.0.2",
41
- "@atlaskit/editor-plugin-block-controls": "4.2.8",
42
- "@atlaskit/editor-plugin-block-menu": "0.0.20",
43
- "@atlaskit/editor-plugin-block-type": "6.2.19",
44
- "@atlaskit/editor-plugin-border": "3.0.5",
45
- "@atlaskit/editor-plugin-breakout": "3.1.13",
46
- "@atlaskit/editor-plugin-caption": "3.2.1",
47
- "@atlaskit/editor-plugin-card": "7.7.3",
48
- "@atlaskit/editor-plugin-clear-marks-on-empty-doc": "3.0.0",
49
- "@atlaskit/editor-plugin-clipboard": "3.0.0",
50
- "@atlaskit/editor-plugin-code-bidi-warning": "3.0.4",
51
- "@atlaskit/editor-plugin-code-block": "5.0.14",
52
- "@atlaskit/editor-plugin-collab-edit": "4.2.3",
53
- "@atlaskit/editor-plugin-composition": "2.0.0",
54
- "@atlaskit/editor-plugin-connectivity": "3.1.1",
55
- "@atlaskit/editor-plugin-content-insertion": "3.1.2",
56
- "@atlaskit/editor-plugin-context-identifier": "3.0.1",
57
- "@atlaskit/editor-plugin-context-panel": "5.1.3",
58
- "@atlaskit/editor-plugin-copy-button": "3.0.2",
59
- "@atlaskit/editor-plugin-custom-autoformat": "3.0.1",
60
- "@atlaskit/editor-plugin-data-consumer": "3.0.5",
61
- "@atlaskit/editor-plugin-date": "5.1.13",
62
- "@atlaskit/editor-plugin-decorations": "3.1.0",
63
- "@atlaskit/editor-plugin-editor-disabled": "3.0.1",
64
- "@atlaskit/editor-plugin-editor-viewmode": "5.0.4",
65
- "@atlaskit/editor-plugin-editor-viewmode-effects": "3.0.1",
66
- "@atlaskit/editor-plugin-emoji": "4.3.3",
67
- "@atlaskit/editor-plugin-engagement-platform": "4.0.1",
68
- "@atlaskit/editor-plugin-expand": "4.3.1",
69
- "@atlaskit/editor-plugin-extension": "6.2.3",
70
- "@atlaskit/editor-plugin-feature-flags": "2.0.1",
71
- "@atlaskit/editor-plugin-feedback-dialog": "3.0.1",
72
- "@atlaskit/editor-plugin-find-replace": "3.2.9",
73
- "@atlaskit/editor-plugin-floating-toolbar": "5.2.4",
74
- "@atlaskit/editor-plugin-focus": "2.0.0",
75
- "@atlaskit/editor-plugin-fragment": "3.0.5",
76
- "@atlaskit/editor-plugin-grid": "3.1.1",
77
- "@atlaskit/editor-plugin-guideline": "3.0.5",
78
- "@atlaskit/editor-plugin-help-dialog": "3.1.8",
79
- "@atlaskit/editor-plugin-highlight": "3.1.2",
80
- "@atlaskit/editor-plugin-history": "3.1.1",
81
- "@atlaskit/editor-plugin-hyperlink": "5.4.14",
82
- "@atlaskit/editor-plugin-image-upload": "3.0.1",
83
- "@atlaskit/editor-plugin-indentation": "3.2.2",
84
- "@atlaskit/editor-plugin-insert-block": "4.3.9",
85
- "@atlaskit/editor-plugin-interaction": "5.0.1",
86
- "@atlaskit/editor-plugin-layout": "3.2.2",
87
- "@atlaskit/editor-plugin-limited-mode": "0.0.3",
88
- "@atlaskit/editor-plugin-list": "5.1.13",
89
- "@atlaskit/editor-plugin-local-id": "1.0.6",
90
- "@atlaskit/editor-plugin-loom": "5.1.6",
91
- "@atlaskit/editor-plugin-max-content-size": "3.0.1",
92
- "@atlaskit/editor-plugin-media": "5.4.4",
93
- "@atlaskit/editor-plugin-media-insert": "9.2.7",
94
- "@atlaskit/editor-plugin-mentions": "5.2.12",
95
- "@atlaskit/editor-plugin-metrics": "4.0.10",
96
- "@atlaskit/editor-plugin-ncs-step-metrics": "2.0.0",
97
- "@atlaskit/editor-plugin-panel": "5.4.6",
98
- "@atlaskit/editor-plugin-paste": "4.1.9",
99
- "@atlaskit/editor-plugin-paste-options-toolbar": "3.1.4",
100
- "@atlaskit/editor-plugin-placeholder": "3.2.3",
101
- "@atlaskit/editor-plugin-placeholder-text": "3.1.10",
102
- "@atlaskit/editor-plugin-primary-toolbar": "4.1.6",
103
- "@atlaskit/editor-plugin-quick-insert": "3.0.10",
104
- "@atlaskit/editor-plugin-rule": "3.0.6",
105
- "@atlaskit/editor-plugin-save-on-enter": "3.0.1",
106
- "@atlaskit/editor-plugin-scroll-into-view": "3.0.2",
107
- "@atlaskit/editor-plugin-selection": "3.2.1",
108
- "@atlaskit/editor-plugin-selection-extension": "3.7.2",
109
- "@atlaskit/editor-plugin-selection-marker": "3.0.10",
110
- "@atlaskit/editor-plugin-selection-toolbar": "4.3.13",
111
- "@atlaskit/editor-plugin-show-diff": "0.2.1",
112
- "@atlaskit/editor-plugin-status": "4.1.11",
113
- "@atlaskit/editor-plugin-submit-editor": "3.1.1",
114
- "@atlaskit/editor-plugin-synced-block": "0.1.2",
115
- "@atlaskit/editor-plugin-table": "12.3.8",
116
- "@atlaskit/editor-plugin-tasks-and-decisions": "6.5.1",
117
- "@atlaskit/editor-plugin-text-color": "3.2.4",
118
- "@atlaskit/editor-plugin-text-formatting": "3.0.27",
119
- "@atlaskit/editor-plugin-toolbar": "0.4.6",
120
- "@atlaskit/editor-plugin-toolbar-lists-indentation": "4.2.12",
121
- "@atlaskit/editor-plugin-track-changes": "2.7.14",
122
- "@atlaskit/editor-plugin-type-ahead": "3.1.14",
123
- "@atlaskit/editor-plugin-ufo": "3.1.3",
124
- "@atlaskit/editor-plugin-undo-redo": "3.2.8",
125
- "@atlaskit/editor-plugin-unsupported-content": "3.0.6",
126
- "@atlaskit/editor-plugin-user-intent": "1.1.1",
127
- "@atlaskit/editor-plugin-user-preferences": "1.2.5",
128
- "@atlaskit/editor-plugin-width": "4.0.5",
32
+ "@atlaskit/editor-plugin-accessibility-utils": "4.0.0",
33
+ "@atlaskit/editor-plugin-alignment": "5.0.0",
34
+ "@atlaskit/editor-plugin-analytics": "4.0.0",
35
+ "@atlaskit/editor-plugin-annotation": "4.0.0",
36
+ "@atlaskit/editor-plugin-avatar-group": "5.0.0",
37
+ "@atlaskit/editor-plugin-base": "5.0.0",
38
+ "@atlaskit/editor-plugin-batch-attribute-updates": "4.0.0",
39
+ "@atlaskit/editor-plugin-before-primary-toolbar": "4.0.0",
40
+ "@atlaskit/editor-plugin-better-type-history": "4.0.0",
41
+ "@atlaskit/editor-plugin-block-controls": "5.0.0",
42
+ "@atlaskit/editor-plugin-block-menu": "1.0.0",
43
+ "@atlaskit/editor-plugin-block-type": "7.0.0",
44
+ "@atlaskit/editor-plugin-border": "4.0.0",
45
+ "@atlaskit/editor-plugin-breakout": "4.0.0",
46
+ "@atlaskit/editor-plugin-caption": "4.0.0",
47
+ "@atlaskit/editor-plugin-card": "8.0.0",
48
+ "@atlaskit/editor-plugin-clear-marks-on-empty-doc": "4.0.0",
49
+ "@atlaskit/editor-plugin-clipboard": "4.0.0",
50
+ "@atlaskit/editor-plugin-code-bidi-warning": "4.0.0",
51
+ "@atlaskit/editor-plugin-code-block": "6.0.0",
52
+ "@atlaskit/editor-plugin-collab-edit": "5.0.0",
53
+ "@atlaskit/editor-plugin-composition": "3.0.0",
54
+ "@atlaskit/editor-plugin-connectivity": "4.0.0",
55
+ "@atlaskit/editor-plugin-content-insertion": "4.0.0",
56
+ "@atlaskit/editor-plugin-context-identifier": "4.0.0",
57
+ "@atlaskit/editor-plugin-context-panel": "6.0.0",
58
+ "@atlaskit/editor-plugin-copy-button": "4.0.0",
59
+ "@atlaskit/editor-plugin-custom-autoformat": "4.0.0",
60
+ "@atlaskit/editor-plugin-data-consumer": "4.0.0",
61
+ "@atlaskit/editor-plugin-date": "6.0.0",
62
+ "@atlaskit/editor-plugin-decorations": "4.0.0",
63
+ "@atlaskit/editor-plugin-editor-disabled": "4.0.0",
64
+ "@atlaskit/editor-plugin-editor-viewmode": "6.0.0",
65
+ "@atlaskit/editor-plugin-editor-viewmode-effects": "4.0.0",
66
+ "@atlaskit/editor-plugin-emoji": "5.0.0",
67
+ "@atlaskit/editor-plugin-engagement-platform": "5.0.0",
68
+ "@atlaskit/editor-plugin-expand": "5.0.0",
69
+ "@atlaskit/editor-plugin-extension": "7.0.0",
70
+ "@atlaskit/editor-plugin-feature-flags": "3.0.0",
71
+ "@atlaskit/editor-plugin-feedback-dialog": "4.0.0",
72
+ "@atlaskit/editor-plugin-find-replace": "4.0.0",
73
+ "@atlaskit/editor-plugin-floating-toolbar": "6.0.0",
74
+ "@atlaskit/editor-plugin-focus": "3.0.0",
75
+ "@atlaskit/editor-plugin-fragment": "4.0.0",
76
+ "@atlaskit/editor-plugin-grid": "4.0.0",
77
+ "@atlaskit/editor-plugin-guideline": "4.0.0",
78
+ "@atlaskit/editor-plugin-help-dialog": "4.0.0",
79
+ "@atlaskit/editor-plugin-highlight": "4.0.0",
80
+ "@atlaskit/editor-plugin-history": "4.0.0",
81
+ "@atlaskit/editor-plugin-hyperlink": "6.0.0",
82
+ "@atlaskit/editor-plugin-image-upload": "4.0.0",
83
+ "@atlaskit/editor-plugin-indentation": "4.0.0",
84
+ "@atlaskit/editor-plugin-insert-block": "5.0.0",
85
+ "@atlaskit/editor-plugin-interaction": "6.0.0",
86
+ "@atlaskit/editor-plugin-layout": "4.0.0",
87
+ "@atlaskit/editor-plugin-limited-mode": "1.0.0",
88
+ "@atlaskit/editor-plugin-list": "6.0.0",
89
+ "@atlaskit/editor-plugin-local-id": "2.0.0",
90
+ "@atlaskit/editor-plugin-loom": "6.0.0",
91
+ "@atlaskit/editor-plugin-max-content-size": "4.0.0",
92
+ "@atlaskit/editor-plugin-media": "6.0.0",
93
+ "@atlaskit/editor-plugin-media-insert": "10.0.0",
94
+ "@atlaskit/editor-plugin-mentions": "6.0.0",
95
+ "@atlaskit/editor-plugin-metrics": "5.0.0",
96
+ "@atlaskit/editor-plugin-ncs-step-metrics": "3.0.0",
97
+ "@atlaskit/editor-plugin-panel": "6.0.0",
98
+ "@atlaskit/editor-plugin-paste": "5.0.0",
99
+ "@atlaskit/editor-plugin-paste-options-toolbar": "4.0.0",
100
+ "@atlaskit/editor-plugin-placeholder": "4.0.0",
101
+ "@atlaskit/editor-plugin-placeholder-text": "4.0.0",
102
+ "@atlaskit/editor-plugin-primary-toolbar": "5.0.0",
103
+ "@atlaskit/editor-plugin-quick-insert": "4.0.0",
104
+ "@atlaskit/editor-plugin-rule": "4.0.0",
105
+ "@atlaskit/editor-plugin-save-on-enter": "4.0.0",
106
+ "@atlaskit/editor-plugin-scroll-into-view": "4.0.0",
107
+ "@atlaskit/editor-plugin-selection": "4.0.0",
108
+ "@atlaskit/editor-plugin-selection-extension": "4.0.0",
109
+ "@atlaskit/editor-plugin-selection-marker": "4.0.0",
110
+ "@atlaskit/editor-plugin-selection-toolbar": "5.0.0",
111
+ "@atlaskit/editor-plugin-show-diff": "1.0.0",
112
+ "@atlaskit/editor-plugin-status": "5.0.0",
113
+ "@atlaskit/editor-plugin-submit-editor": "4.0.0",
114
+ "@atlaskit/editor-plugin-synced-block": "1.0.0",
115
+ "@atlaskit/editor-plugin-table": "13.0.0",
116
+ "@atlaskit/editor-plugin-tasks-and-decisions": "7.0.0",
117
+ "@atlaskit/editor-plugin-text-color": "4.0.0",
118
+ "@atlaskit/editor-plugin-text-formatting": "4.0.0",
119
+ "@atlaskit/editor-plugin-toolbar": "1.0.0",
120
+ "@atlaskit/editor-plugin-toolbar-lists-indentation": "5.0.0",
121
+ "@atlaskit/editor-plugin-track-changes": "3.0.0",
122
+ "@atlaskit/editor-plugin-type-ahead": "4.0.0",
123
+ "@atlaskit/editor-plugin-ufo": "4.0.0",
124
+ "@atlaskit/editor-plugin-undo-redo": "4.0.0",
125
+ "@atlaskit/editor-plugin-unsupported-content": "4.0.0",
126
+ "@atlaskit/editor-plugin-user-intent": "2.0.0",
127
+ "@atlaskit/editor-plugin-user-preferences": "2.0.0",
128
+ "@atlaskit/editor-plugin-width": "5.0.0",
129
129
  "@babel/runtime": "^7.0.0"
130
130
  },
131
131
  "peerDependencies": {
@@ -7,11 +7,11 @@ import path from 'path';
7
7
  // eslint-disable-next-line import/no-namespace
8
8
  import * as ts from 'typescript';
9
9
 
10
- interface ExtractedAfExportData {
10
+ interface ExtractedExportData {
11
11
  absoluteFilePath: string;
12
12
  atlaskitImportName: string;
13
- newAfExportKey: string;
14
- newAfExportValue: string;
13
+ newExportKey: string;
14
+ newExportValue: string;
15
15
  newRelativeFilePath: string;
16
16
  }
17
17
 
@@ -20,13 +20,13 @@ interface FileData {
20
20
  newRelativeFilePath: string;
21
21
  }
22
22
 
23
- interface NewAfExportData {
24
- newAfExportKey: string;
25
- newAfExportValue: string;
23
+ interface NewExportData {
24
+ newExportKey: string;
25
+ newExportValue: string;
26
26
  }
27
27
 
28
28
  export interface EntryPointData {
29
- afExportData: NewAfExportData;
29
+ exportData: NewExportData;
30
30
  atlaskitImportName: string;
31
31
  fileData: FileData;
32
32
  }
@@ -41,7 +41,7 @@ function getExports(folderPath: string) {
41
41
  }
42
42
 
43
43
  const folderName = path.basename(folderPath);
44
- const data: ExtractedAfExportData[] = [];
44
+ const data: ExtractedExportData[] = [];
45
45
 
46
46
  for (const key in exportsValue) {
47
47
  if (exportsValue.hasOwnProperty(key)) {
@@ -57,8 +57,8 @@ function getExports(folderPath: string) {
57
57
  );
58
58
  data.push({
59
59
  newRelativeFilePath: newRelativeFilePath,
60
- newAfExportKey: './' + path.join(shortenedFolderName, normalizedKey),
61
- newAfExportValue: './' + newRelativeFilePath,
60
+ newExportKey: './' + path.join(shortenedFolderName, normalizedKey),
61
+ newExportValue: './' + newRelativeFilePath,
62
62
  atlaskitImportName: path.join('@atlaskit', folderName, normalizedKey),
63
63
  absoluteFilePath: path.join(folderPath, normalizedValue),
64
64
  });
@@ -99,7 +99,7 @@ function isTypeExport(exportName: string, statements: string[]): boolean {
99
99
  );
100
100
  }
101
101
 
102
- function createExportStatementsForAfExport(importName: string, filePath: string) {
102
+ function createExportStatementsForExport(importName: string, filePath: string) {
103
103
  const { variableExports, typeExports } = findExportedVariablesAndTypes(filePath);
104
104
 
105
105
  const exportStatements = [
@@ -209,31 +209,28 @@ function getFileExportNames(fileName: string) {
209
209
 
210
210
  export function getEntryPointDataForPlugin(pluginPath: string): EntryPointData[] {
211
211
  const exportsValue = getExports(pluginPath);
212
- const newAfExportData: EntryPointData[] = [];
212
+ const newExportData: EntryPointData[] = [];
213
213
 
214
214
  for (const {
215
215
  newRelativeFilePath,
216
- newAfExportKey,
217
- newAfExportValue,
216
+ newExportKey,
217
+ newExportValue,
218
218
  atlaskitImportName,
219
219
  absoluteFilePath,
220
220
  } of exportsValue) {
221
- const exportStatements = createExportStatementsForAfExport(
222
- atlaskitImportName,
223
- absoluteFilePath,
224
- );
225
- newAfExportData.push({
221
+ const exportStatements = createExportStatementsForExport(atlaskitImportName, absoluteFilePath);
222
+ newExportData.push({
226
223
  fileData: {
227
224
  newRelativeFilePath,
228
225
  fileContent: exportStatements,
229
226
  },
230
- afExportData: {
231
- newAfExportKey: newAfExportKey,
232
- newAfExportValue: newAfExportValue,
227
+ exportData: {
228
+ newExportKey,
229
+ newExportValue,
233
230
  },
234
231
  atlaskitImportName,
235
232
  });
236
233
  }
237
234
 
238
- return newAfExportData;
235
+ return newExportData;
239
236
  }
@@ -51,11 +51,11 @@ describe('${pluginName} wrapper', () => {
51
51
  }
52
52
 
53
53
  function generateEntryPointTest(entryPointData: EntryPointData) {
54
- const wrapperImport = entryPointData.afExportData.newAfExportValue
54
+ const wrapperImport = entryPointData.exportData.newExportValue
55
55
  .replace('src/', '')
56
56
  .replace('.ts', '');
57
57
  return `
58
- it('check ${entryPointData.afExportData.newAfExportKey} exports all the same variables as the original', () => {
58
+ it('check ${entryPointData.exportData.newExportKey} exports all the same variables as the original', () => {
59
59
  const original = require('${entryPointData.atlaskitImportName}');
60
60
  const wrapper = require('.${wrapperImport}');
61
61
  const originalKeys = Object.keys(original).sort();
@@ -142,13 +142,13 @@ function orderObjectByDepthAndRoot(input: { [key: string]: string }): {
142
142
  );
143
143
  }
144
144
 
145
- function getNewAfExports(entryPointData: EntryPointData[]): Record<string, string> {
146
- // af:exports we want to keep are hardcoded here
147
- const afExports: Record<string, string> = {};
148
- entryPointData.forEach(({ afExportData }) => {
149
- afExports[afExportData.newAfExportKey] = afExportData.newAfExportValue;
145
+ function getNewExports(entryPointData: EntryPointData[]): Record<string, string> {
146
+ // exports we want to keep are hardcoded here
147
+ const newExports: Record<string, string> = {};
148
+ entryPointData.forEach(({ exportData }) => {
149
+ newExports[exportData.newExportKey] = exportData.newExportValue;
150
150
  });
151
- return afExports;
151
+ return newExports;
152
152
  }
153
153
 
154
154
  function getUpdatedDependenciesFromPackageJsons(
@@ -265,7 +265,7 @@ This may be a problem with Prettier rather than code. Please check support chann
265
265
  }
266
266
 
267
267
  // Function to update plugin files based on dependencies
268
- // returns the afExports object
268
+ // returns the exports object
269
269
  function updatePluginsFiles(
270
270
  depFolderNames: string[],
271
271
  entryPointDatas: EntryPointData[],
@@ -464,7 +464,7 @@ async function run() {
464
464
  });
465
465
  const allEntryPointData = Object.values(pluginEntryPointDataMap).flat();
466
466
  updatePluginsFiles(depFolderNames, allEntryPointData, argv['dry-run']);
467
- const newEditorPluginsAfExports = getNewAfExports(allEntryPointData);
467
+ const newEditorPluginsExports = getNewExports(allEntryPointData);
468
468
  generateAllPluginTests(
469
469
  pluginEntryPointDataMap,
470
470
  path.join(editorPluginsPath, 'src', '__tests__'),
@@ -479,11 +479,19 @@ async function run() {
479
479
  };
480
480
  const updatedPackageJson = {
481
481
  ...editorPluginsPackageJson,
482
- 'af:exports': orderObjectByDepthAndRoot(newEditorPluginsAfExports),
483
- exports: orderObjectByDepthAndRoot(newEditorPluginsAfExports),
482
+ exports: orderObjectByDepthAndRoot(newEditorPluginsExports),
484
483
  dependencies: sortObjectKeys(updatedDeps),
485
484
  'platform-feature-flags': featureFlags,
485
+ // only update the 'af:exports' property if it already exists in the package
486
+ ...(editorPluginsPackageJson['af:exports'] && {
487
+ 'af:exports': orderObjectByDepthAndRoot(newEditorPluginsExports),
488
+ }),
489
+ // only update the 'exports' property if it already exists in the package
490
+ ...(editorPluginsPackageJson.exports && {
491
+ exports: orderObjectByDepthAndRoot(newEditorPluginsExports),
492
+ }),
486
493
  };
494
+
487
495
  const updatedPackageJsonString = JSON.stringify(updatedPackageJson, null, '\t') + '\n';
488
496
 
489
497
  fs.writeFileSync(editorPluginsPackageJsonPath, updatedPackageJsonString);