@atlaskit/section-message 6.5.3 → 6.5.5

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,17 @@
1
1
  # @atlaskit/section-message
2
2
 
3
+ ## 6.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.5.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 6.5.3
4
16
 
5
17
  ### Patch Changes
@@ -26,7 +38,7 @@
26
38
 
27
39
  - [#94378](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94378)
28
40
  [`1a8f0d378a8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1a8f0d378a8e) -
29
- Add support for React 18.
41
+ Add support for React 18 in non-strict mode.
30
42
 
31
43
  ## 6.4.26
32
44
 
package/README.md CHANGED
@@ -10,4 +10,5 @@ yarn add @atlaskit/section-message
10
10
 
11
11
  ## Usage
12
12
 
13
- Detailed docs and example usage can be found [here](https://atlassian.design/components/section-message/).
13
+ Detailed docs and example usage can be found
14
+ [here](https://atlassian.design/components/section-message/).
@@ -2,6 +2,4 @@ import React from 'react';
2
2
 
3
3
  import SectionMessage from '../src';
4
4
 
5
- export default () => (
6
- <SectionMessage title="Editing is restricted">hello world</SectionMessage>
7
- );
5
+ export default () => <SectionMessage title="Editing is restricted">hello world</SectionMessage>;
@@ -3,22 +3,22 @@ import React from 'react';
3
3
  import SectionMessage, { SectionMessageAction } from '../src';
4
4
 
5
5
  export default () => {
6
- return (
7
- <SectionMessage
8
- title="The Modern Prometheus"
9
- actions={[
10
- <SectionMessageAction href="https://en.wikipedia.org/wiki/Mary_Shelley">
11
- Mary
12
- </SectionMessageAction>,
13
- <SectionMessageAction href="https://en.wikipedia.org/wiki/Villa_Diodati">
14
- Villa Diodatti
15
- </SectionMessageAction>,
16
- ]}
17
- >
18
- You will rejoice to hear that no disaster has accompanied the commencement
19
- of an enterprise which you have regarded with such evil forebodings. I
20
- arrived here yesterday, and my first task is to assure my dear sister of
21
- my welfare and increasing confidence in the success of my undertaking.
22
- </SectionMessage>
23
- );
6
+ return (
7
+ <SectionMessage
8
+ title="The Modern Prometheus"
9
+ actions={[
10
+ <SectionMessageAction href="https://en.wikipedia.org/wiki/Mary_Shelley">
11
+ Mary
12
+ </SectionMessageAction>,
13
+ <SectionMessageAction href="https://en.wikipedia.org/wiki/Villa_Diodati">
14
+ Villa Diodatti
15
+ </SectionMessageAction>,
16
+ ]}
17
+ >
18
+ You will rejoice to hear that no disaster has accompanied the commencement of an enterprise
19
+ which you have regarded with such evil forebodings. I arrived here yesterday, and my first
20
+ task is to assure my dear sister of my welfare and increasing confidence in the success of my
21
+ undertaking.
22
+ </SectionMessage>
23
+ );
24
24
  };
@@ -3,12 +3,12 @@ import React from 'react';
3
3
  import SectionMessage from '../src';
4
4
 
5
5
  export default () => {
6
- return (
7
- <SectionMessage title="The Modern Prometheus">
8
- You will rejoice to hear that no disaster has accompanied the commencement
9
- of an enterprise which you have regarded with such evil forebodings. I
10
- arrived here yesterday, and my first task is to assure my dear sister of
11
- my welfare and increasing confidence in the success of my undertaking.
12
- </SectionMessage>
13
- );
6
+ return (
7
+ <SectionMessage title="The Modern Prometheus">
8
+ You will rejoice to hear that no disaster has accompanied the commencement of an enterprise
9
+ which you have regarded with such evil forebodings. I arrived here yesterday, and my first
10
+ task is to assure my dear sister of my welfare and increasing confidence in the success of my
11
+ undertaking.
12
+ </SectionMessage>
13
+ );
14
14
  };
@@ -1,10 +1,7 @@
1
1
  import { type JSCodeshift } from 'jscodeshift';
2
2
  import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import {
5
- createTransformer,
6
- hasImportDeclaration,
7
- } from '@atlaskit/codemod-utils';
4
+ import { createTransformer, hasImportDeclaration } from '@atlaskit/codemod-utils';
8
5
 
9
6
  import { changeAppearanceProp } from './internal/change-appearance-prop';
10
7
  import { SECTION_MESSAGE_PACKAGE_NAME } from './internal/constants';
@@ -12,10 +9,10 @@ import { mapActionsProp } from './internal/map-actions-prop';
12
9
  import { hasDynamicImport } from './internal/utils';
13
10
 
14
11
  const transformer = createTransformer(
15
- [changeAppearanceProp, mapActionsProp],
16
- (j: JSCodeshift, source: Collection<Node>) =>
17
- hasImportDeclaration(j, source, SECTION_MESSAGE_PACKAGE_NAME) ||
18
- hasDynamicImport(j, source, SECTION_MESSAGE_PACKAGE_NAME),
12
+ [changeAppearanceProp, mapActionsProp],
13
+ (j: JSCodeshift, source: Collection<Node>) =>
14
+ hasImportDeclaration(j, source, SECTION_MESSAGE_PACKAGE_NAME) ||
15
+ hasDynamicImport(j, source, SECTION_MESSAGE_PACKAGE_NAME),
19
16
  );
20
17
 
21
18
  export default transformer;
@@ -3,10 +3,10 @@ import transformer from '../6.0.0-lite-mode';
3
3
  const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
4
4
 
5
5
  describe('section message codemod', () => {
6
- defineInlineTest(
7
- { default: transformer, parser: 'tsx' },
8
- {},
9
- `
6
+ defineInlineTest(
7
+ { default: transformer, parser: 'tsx' },
8
+ {},
9
+ `
10
10
  import React from "react";
11
11
  import SectionMessage from "@atlaskit/section-message";
12
12
 
@@ -24,7 +24,7 @@ describe('section message codemod', () => {
24
24
  />
25
25
  );
26
26
  `,
27
- `
27
+ `
28
28
  import React from "react";
29
29
  import SectionMessage, { SectionMessageAction } from "@atlaskit/section-message";
30
30
 
@@ -47,13 +47,13 @@ describe('section message codemod', () => {
47
47
  />
48
48
  );
49
49
  `,
50
- 'should transform both appearance and actions prop',
51
- );
50
+ 'should transform both appearance and actions prop',
51
+ );
52
52
 
53
- defineInlineTest(
54
- { default: transformer, parser: 'tsx' },
55
- {},
56
- `
53
+ defineInlineTest(
54
+ { default: transformer, parser: 'tsx' },
55
+ {},
56
+ `
57
57
  import React from "react";
58
58
  import SectionMessage from "@atlaskit/section-message";
59
59
 
@@ -71,7 +71,7 @@ describe('section message codemod', () => {
71
71
  />
72
72
  );
73
73
  `,
74
- `
74
+ `
75
75
  import React from "react";
76
76
  import SectionMessage, { SectionMessageAction } from "@atlaskit/section-message";
77
77
 
@@ -94,13 +94,13 @@ describe('section message codemod', () => {
94
94
  />
95
95
  );
96
96
  `,
97
- 'should transform both appearance and actions prop when arranged in different order',
98
- );
97
+ 'should transform both appearance and actions prop when arranged in different order',
98
+ );
99
99
 
100
- defineInlineTest(
101
- { default: transformer, parser: 'tsx' },
102
- {},
103
- `
100
+ defineInlineTest(
101
+ { default: transformer, parser: 'tsx' },
102
+ {},
103
+ `
104
104
  import React from "react";
105
105
  import SectionMessage from "@atlaskit/section-message";
106
106
 
@@ -119,7 +119,7 @@ describe('section message codemod', () => {
119
119
  />
120
120
  );
121
121
  `,
122
- `
122
+ `
123
123
  import React from "react";
124
124
  import SectionMessage, { SectionMessageAction } from "@atlaskit/section-message";
125
125
 
@@ -143,13 +143,13 @@ describe('section message codemod', () => {
143
143
  />
144
144
  );
145
145
  `,
146
- 'should transform both appearance and actions prop when a prop is in between them',
147
- );
146
+ 'should transform both appearance and actions prop when a prop is in between them',
147
+ );
148
148
 
149
- defineInlineTest(
150
- { default: transformer, parser: 'tsx' },
151
- {},
152
- `
149
+ defineInlineTest(
150
+ { default: transformer, parser: 'tsx' },
151
+ {},
152
+ `
153
153
  import React from "react";
154
154
  import SectionMessage from "@atlaskit/section-message";
155
155
 
@@ -167,7 +167,7 @@ describe('section message codemod', () => {
167
167
  />
168
168
  );
169
169
  `,
170
- `
170
+ `
171
171
  import React from "react";
172
172
  import SectionMessage from "@atlaskit/section-message";
173
173
 
@@ -185,13 +185,13 @@ describe('section message codemod', () => {
185
185
  />
186
186
  );
187
187
  `,
188
- 'should transform only appearance prop',
189
- );
188
+ 'should transform only appearance prop',
189
+ );
190
190
 
191
- defineInlineTest(
192
- { default: transformer, parser: 'tsx' },
193
- {},
194
- `
191
+ defineInlineTest(
192
+ { default: transformer, parser: 'tsx' },
193
+ {},
194
+ `
195
195
  import React from "react";
196
196
  import SectionMessage from "@atlaskit/section-message";
197
197
 
@@ -209,7 +209,7 @@ describe('section message codemod', () => {
209
209
  />
210
210
  );
211
211
  `,
212
- `
212
+ `
213
213
  import React from "react";
214
214
  import SectionMessage, { SectionMessageAction } from "@atlaskit/section-message";
215
215
 
@@ -232,13 +232,13 @@ describe('section message codemod', () => {
232
232
  />
233
233
  );
234
234
  `,
235
- 'should transform only actions prop',
236
- );
235
+ 'should transform only actions prop',
236
+ );
237
237
 
238
- defineInlineTest(
239
- { default: transformer, parser: 'tsx' },
240
- {},
241
- `
238
+ defineInlineTest(
239
+ { default: transformer, parser: 'tsx' },
240
+ {},
241
+ `
242
242
  import React from "react";
243
243
  import SectionMessage from "@atlaskit/section-message";
244
244
 
@@ -260,7 +260,7 @@ describe('section message codemod', () => {
260
260
  />
261
261
  );
262
262
  `,
263
- `
263
+ `
264
264
  import React from "react";
265
265
  import SectionMessage, { SectionMessageAction } from "@atlaskit/section-message";
266
266
 
@@ -285,13 +285,13 @@ describe('section message codemod', () => {
285
285
  appearance="information" />
286
286
  );
287
287
  `,
288
- 'should transform both appearance and actions prop and move linkComponent to "SectionMessageAction"',
289
- );
288
+ 'should transform both appearance and actions prop and move linkComponent to "SectionMessageAction"',
289
+ );
290
290
 
291
- defineInlineTest(
292
- { default: transformer, parser: 'tsx' },
293
- {},
294
- `
291
+ defineInlineTest(
292
+ { default: transformer, parser: 'tsx' },
293
+ {},
294
+ `
295
295
  import React from "react";
296
296
  import SectionMessage from "@atlaskit/section-message";
297
297
 
@@ -305,7 +305,7 @@ describe('section message codemod', () => {
305
305
  />
306
306
  );
307
307
  `,
308
- `
308
+ `
309
309
  import React from "react";
310
310
  import SectionMessage from "@atlaskit/section-message";
311
311
 
@@ -315,6 +315,6 @@ describe('section message codemod', () => {
315
315
  <SectionMessage title="hello" appearance="information" />
316
316
  );
317
317
  `,
318
- 'should transform appearance prop and remove linkComponent prop if no actions prop is present',
319
- );
318
+ 'should transform appearance prop and remove linkComponent prop if no actions prop is present',
319
+ );
320
320
  });
@@ -7,10 +7,10 @@ const transformer = createTransformer([changeAppearanceProp]);
7
7
  const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
8
8
 
9
9
  describe('SectionMessage code-mods', () => {
10
- defineInlineTest(
11
- { default: transformer, parser: 'tsx' },
12
- {},
13
- `
10
+ defineInlineTest(
11
+ { default: transformer, parser: 'tsx' },
12
+ {},
13
+ `
14
14
  import React from 'react';
15
15
  import SectionMessage from '@atlaskit/section-message';
16
16
 
@@ -35,7 +35,7 @@ describe('SectionMessage code-mods', () => {
35
35
  );
36
36
  }
37
37
  `,
38
- `
38
+ `
39
39
  import React from 'react';
40
40
  import SectionMessage from '@atlaskit/section-message';
41
41
 
@@ -60,13 +60,13 @@ describe('SectionMessage code-mods', () => {
60
60
  );
61
61
  }
62
62
  `,
63
- `should change the value of appearance prop from "info" to "information"`,
64
- );
63
+ `should change the value of appearance prop from "info" to "information"`,
64
+ );
65
65
 
66
- defineInlineTest(
67
- { default: transformer, parser: 'tsx' },
68
- {},
69
- `
66
+ defineInlineTest(
67
+ { default: transformer, parser: 'tsx' },
68
+ {},
69
+ `
70
70
  import React from 'react';
71
71
  import SectionMessage from '@atlaskit/section-message';
72
72
 
@@ -85,7 +85,7 @@ describe('SectionMessage code-mods', () => {
85
85
  );
86
86
  }
87
87
  `,
88
- `
88
+ `
89
89
  import React from 'react';
90
90
  import SectionMessage from '@atlaskit/section-message';
91
91
 
@@ -104,13 +104,13 @@ describe('SectionMessage code-mods', () => {
104
104
  );
105
105
  }
106
106
  `,
107
- `should change the value of appearance prop from "confirmation" to "success"`,
108
- );
107
+ `should change the value of appearance prop from "confirmation" to "success"`,
108
+ );
109
109
 
110
- defineInlineTest(
111
- { default: transformer, parser: 'tsx' },
112
- {},
113
- `
110
+ defineInlineTest(
111
+ { default: transformer, parser: 'tsx' },
112
+ {},
113
+ `
114
114
  import React from 'react';
115
115
  import SectionMessage from '@atlaskit/section-message';
116
116
 
@@ -128,7 +128,7 @@ describe('SectionMessage code-mods', () => {
128
128
  );
129
129
  }
130
130
  `,
131
- `
131
+ `
132
132
  import React from 'react';
133
133
  import SectionMessage from '@atlaskit/section-message';
134
134
 
@@ -146,13 +146,13 @@ describe('SectionMessage code-mods', () => {
146
146
  );
147
147
  }
148
148
  `,
149
- `should change the value of appearance prop from "change" to "discovery"`,
150
- );
149
+ `should change the value of appearance prop from "change" to "discovery"`,
150
+ );
151
151
 
152
- defineInlineTest(
153
- { default: transformer, parser: 'tsx' },
154
- {},
155
- `
152
+ defineInlineTest(
153
+ { default: transformer, parser: 'tsx' },
154
+ {},
155
+ `
156
156
  import React from 'react';
157
157
  import SectionMessage from '@atlaskit/section-message';
158
158
  const App = () => {
@@ -168,7 +168,7 @@ describe('SectionMessage code-mods', () => {
168
168
  );
169
169
  }
170
170
  `,
171
- `
171
+ `
172
172
  import React from 'react';
173
173
  import SectionMessage from '@atlaskit/section-message';
174
174
  const App = () => {
@@ -184,13 +184,13 @@ describe('SectionMessage code-mods', () => {
184
184
  );
185
185
  }
186
186
  `,
187
- `should change the value of appearance prop from "change" to "discovery" when appearance value is string wrapped in JSX expression`,
188
- );
187
+ `should change the value of appearance prop from "change" to "discovery" when appearance value is string wrapped in JSX expression`,
188
+ );
189
189
 
190
- defineInlineTest(
191
- { default: transformer, parser: 'tsx' },
192
- {},
193
- `
190
+ defineInlineTest(
191
+ { default: transformer, parser: 'tsx' },
192
+ {},
193
+ `
194
194
  import React from 'react';
195
195
  import SectionMessage from '@atlaskit/section-message';
196
196
 
@@ -207,7 +207,7 @@ describe('SectionMessage code-mods', () => {
207
207
  );
208
208
  }
209
209
  `,
210
- `
210
+ `
211
211
  import React from 'react';
212
212
  import SectionMessage from '@atlaskit/section-message';
213
213
 
@@ -224,13 +224,13 @@ describe('SectionMessage code-mods', () => {
224
224
  );
225
225
  }
226
226
  `,
227
- `should not change the value of appearance prop when it's not one of "info","confirmation","change"`,
228
- );
227
+ `should not change the value of appearance prop when it's not one of "info","confirmation","change"`,
228
+ );
229
229
 
230
- defineInlineTest(
231
- { default: transformer, parser: 'tsx' },
232
- {},
233
- `
230
+ defineInlineTest(
231
+ { default: transformer, parser: 'tsx' },
232
+ {},
233
+ `
234
234
  import React from 'react';
235
235
  import SectionMessage from '@atlaskit/section-message';
236
236
  const App = () => {
@@ -245,7 +245,7 @@ describe('SectionMessage code-mods', () => {
245
245
  );
246
246
  }
247
247
  `,
248
- `
248
+ `
249
249
  import React from 'react';
250
250
  import SectionMessage from '@atlaskit/section-message';
251
251
  const App = () => {
@@ -260,13 +260,13 @@ describe('SectionMessage code-mods', () => {
260
260
  );
261
261
  }
262
262
  `,
263
- `should not change the value of appearance prop when it's not one of "info","confirmation","change" and value is string wrapped in JSX expression`,
264
- );
263
+ `should not change the value of appearance prop when it's not one of "info","confirmation","change" and value is string wrapped in JSX expression`,
264
+ );
265
265
 
266
- defineInlineTest(
267
- { default: transformer, parser: 'tsx' },
268
- {},
269
- `
266
+ defineInlineTest(
267
+ { default: transformer, parser: 'tsx' },
268
+ {},
269
+ `
270
270
  import React from 'react';
271
271
  import SectionMessage from '@atlaskit/section-message';
272
272
  const appearanceValue = "change";
@@ -284,7 +284,7 @@ describe('SectionMessage code-mods', () => {
284
284
  );
285
285
  }
286
286
  `,
287
- `
287
+ `
288
288
  import React from 'react';
289
289
  import SectionMessage from '@atlaskit/section-message';
290
290
  const appearanceValue = "change";
@@ -308,13 +308,13 @@ describe('SectionMessage code-mods', () => {
308
308
  );
309
309
  }
310
310
  `,
311
- `should add appearance mapping when appearance prop value is other than string`,
312
- );
311
+ `should add appearance mapping when appearance prop value is other than string`,
312
+ );
313
313
 
314
- defineInlineTest(
315
- { default: transformer, parser: 'tsx' },
316
- {},
317
- `
314
+ defineInlineTest(
315
+ { default: transformer, parser: 'tsx' },
316
+ {},
317
+ `
318
318
  import React from 'react';
319
319
  import SectionMessage from '@atlaskit/section-message';
320
320
  const appearanceValue = "error";
@@ -331,7 +331,7 @@ describe('SectionMessage code-mods', () => {
331
331
  );
332
332
  }
333
333
  `,
334
- `
334
+ `
335
335
  import React from 'react';
336
336
  import SectionMessage from '@atlaskit/section-message';
337
337
  const appearanceValue = "error";
@@ -354,13 +354,13 @@ describe('SectionMessage code-mods', () => {
354
354
  );
355
355
  }
356
356
  `,
357
- `should add appearance mapping when appearance prop value is conditional type`,
358
- );
357
+ `should add appearance mapping when appearance prop value is conditional type`,
358
+ );
359
359
 
360
- defineInlineTest(
361
- { default: transformer, parser: 'tsx' },
362
- {},
363
- `
360
+ defineInlineTest(
361
+ { default: transformer, parser: 'tsx' },
362
+ {},
363
+ `
364
364
  import React from 'react';
365
365
  import SectionMessage from '@atlaskit/section-message';
366
366
  const appearance = { value: { ohRealValue: "error" } };
@@ -377,7 +377,7 @@ describe('SectionMessage code-mods', () => {
377
377
  );
378
378
  }
379
379
  `,
380
- `
380
+ `
381
381
  import React from 'react';
382
382
  import SectionMessage from '@atlaskit/section-message';
383
383
  const appearance = { value: { ohRealValue: "error" } };
@@ -400,6 +400,6 @@ describe('SectionMessage code-mods', () => {
400
400
  );
401
401
  }
402
402
  `,
403
- `should add appearance mapping when appearance prop value is complex object type`,
404
- );
403
+ `should add appearance mapping when appearance prop value is complex object type`,
404
+ );
405
405
  });