@financial-times/n-myft-ui 25.0.0 → 26.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.circleci/config.yml +26 -12
- package/README.md +2 -3
- package/build-state/npm-shrinkwrap.json +18704 -19936
- package/components/collections/collections.jsx +3 -3
- package/components/concept-list/concept-list.jsx +19 -5
- package/components/csrf-token/input.jsx +1 -7
- package/components/csrf-token/{__tests__/input.test.js → input.test.js} +2 -2
- package/components/follow-button/follow-button.jsx +3 -1
- package/components/follow-button/{__tests__/follow-button.test.js → follow-button.test.js} +1 -1
- package/components/index.js +3 -1
- package/components/instant-alert/instant-alert.jsx +73 -0
- package/components/instant-alert/instant-alert.test.js +86 -0
- package/components/pin-button/pin-button.jsx +30 -30
- package/components/pin-button/pin-button.test.js +2 -2
- package/components/save-for-later/save-for-later.jsx +19 -21
- package/demos/templates/demo.html +1 -2
- package/dist/bundles/bundle.js +174 -75
- package/jsx-migration.md +16 -0
- package/package.json +2 -2
- package/components/instant-alert/instant-alert.html +0 -47
package/.circleci/config.yml
CHANGED
@@ -2,50 +2,60 @@
|
|
2
2
|
# template: component
|
3
3
|
|
4
4
|
references:
|
5
|
-
container_config_node:
|
5
|
+
container_config_node:
|
6
|
+
&container_config_node
|
6
7
|
working_directory: ~/project/build
|
7
8
|
docker:
|
8
9
|
- image: circleci/node:12-browsers
|
9
10
|
|
10
11
|
workspace_root: &workspace_root ~/project
|
11
12
|
|
12
|
-
attach_workspace:
|
13
|
+
attach_workspace:
|
14
|
+
&attach_workspace
|
13
15
|
attach_workspace:
|
14
16
|
at: *workspace_root
|
15
17
|
|
16
|
-
npm_cache_keys:
|
18
|
+
npm_cache_keys:
|
19
|
+
&npm_cache_keys
|
17
20
|
keys:
|
18
21
|
- v8-dependency-npm-{{ checksum "package-lock.json" }}-
|
19
22
|
- v8-dependency-npm-{{ checksum "package-lock.json" }}
|
20
23
|
- v8-dependency-npm-
|
21
24
|
|
22
|
-
cache_npm_cache:
|
25
|
+
cache_npm_cache:
|
26
|
+
&cache_npm_cache
|
23
27
|
save_cache:
|
24
28
|
key: v8-dependency-npm-{{ checksum "package-lock.json" }}-{{ epoch }}
|
25
29
|
paths:
|
26
30
|
- ./node_modules/
|
27
31
|
|
28
|
-
restore_npm_cache:
|
32
|
+
restore_npm_cache:
|
33
|
+
&restore_npm_cache
|
29
34
|
restore_cache:
|
30
35
|
<<: *npm_cache_keys
|
31
36
|
|
32
|
-
filters_ignore_gh_pages:
|
37
|
+
filters_ignore_gh_pages:
|
38
|
+
&filters_ignore_gh_pages
|
33
39
|
branches:
|
34
40
|
ignore: gh_pages
|
35
41
|
|
36
|
-
filters_only_main:
|
42
|
+
filters_only_main:
|
43
|
+
&filters_only_main
|
37
44
|
branches:
|
38
45
|
only: main
|
39
46
|
|
40
|
-
filters_ignore_main:
|
47
|
+
filters_ignore_main:
|
48
|
+
&filters_ignore_main
|
41
49
|
branches:
|
42
50
|
ignore: main
|
43
51
|
|
44
|
-
filters_ignore_tags:
|
52
|
+
filters_ignore_tags:
|
53
|
+
&filters_ignore_tags
|
45
54
|
tags:
|
46
55
|
ignore: /.*/
|
47
56
|
|
48
|
-
filters_version_tag:
|
57
|
+
filters_version_tag:
|
58
|
+
&filters_version_tag
|
49
59
|
tags:
|
50
60
|
only:
|
51
61
|
- /^v?\d+\.\d+\.\d+(?:-beta\.\d+)?$/
|
@@ -66,7 +76,9 @@ jobs:
|
|
66
76
|
version: "7"
|
67
77
|
- run:
|
68
78
|
name: Checkout next-ci-shared-helpers
|
69
|
-
command: git clone --depth 1
|
79
|
+
command: git clone --depth 1
|
80
|
+
git@github.com:Financial-Times/next-ci-shared-helpers.git
|
81
|
+
.circleci/shared-helpers
|
70
82
|
- *restore_npm_cache
|
71
83
|
- run:
|
72
84
|
name: Install project dependencies
|
@@ -114,7 +126,8 @@ jobs:
|
|
114
126
|
- run:
|
115
127
|
name: shared-helper / npm-store-auth-token
|
116
128
|
command: .circleci/shared-helpers/helper-npm-store-auth-token
|
117
|
-
- run: npx snyk monitor --org=customer-products
|
129
|
+
- run: npx snyk monitor --org=customer-products
|
130
|
+
--project-name=Financial-Times/n-myft-ui
|
118
131
|
- run:
|
119
132
|
name: shared-helper / npm-version-and-publish-public
|
120
133
|
command: .circleci/shared-helpers/helper-npm-version-and-publish-public
|
@@ -160,6 +173,7 @@ workflows:
|
|
160
173
|
requires:
|
161
174
|
- build
|
162
175
|
- publish:
|
176
|
+
context: npm-publish-token
|
163
177
|
filters:
|
164
178
|
<<: *filters_version_tag
|
165
179
|
requires:
|
package/README.md
CHANGED
@@ -44,7 +44,7 @@ View the demo on `localhost:5005`
|
|
44
44
|
|
45
45
|
### Upgrading from v25
|
46
46
|
|
47
|
-
|
47
|
+
V25 introduces some major changes to n-myft-ui components. Some of the components have been moved from handlebars to jsx.
|
48
48
|
|
49
49
|
These components include:
|
50
50
|
- csrf-token
|
@@ -53,6 +53,7 @@ These components include:
|
|
53
53
|
- pin-button
|
54
54
|
- concept-list
|
55
55
|
- collections
|
56
|
+
- InstantAlert
|
56
57
|
|
57
58
|
A consumer of any of these components needs to render them directly as `jsx` components in a parent `jsx` component or use the `renderReactComponent` helper function provided by `@financial-times/dotcom-server-handlebars` in a consuming handlebars template/partial.
|
58
59
|
|
@@ -87,5 +88,3 @@ To render a jsx component in a handlebars partial, consumers need to add the `he
|
|
87
88
|
|
88
89
|
More examples of rendering jsx in handlebars partials can be found [here](https://github.com/Financial-Times/n-myft-ui/blob/main/demos/templates/demo.html)
|
89
90
|
|
90
|
-
|
91
|
-
NB: This branch is the development branch for v25 and all bug fixes for breaking changes related to `jsx` go here.
|