@financial-times/n-myft-ui 23.1.2 → 24.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,19 +2,12 @@
2
2
  # template: component
3
3
 
4
4
  references:
5
-
6
- container_config_node12: &container_config_node12
5
+ container_config_node: &container_config_node
7
6
  working_directory: ~/project/build
8
7
  docker:
9
8
  - image: circleci/node:12-browsers
10
9
 
11
- container_config_lambda_node12: &container_config_lambda_node12
12
- working_directory: ~/project/build
13
- docker:
14
- - image: lambci/lambda:build-nodejs12.x
15
-
16
- workspace_root: &workspace_root
17
- ~/project
10
+ workspace_root: &workspace_root ~/project
18
11
 
19
12
  attach_workspace: &attach_workspace
20
13
  attach_workspace:
@@ -22,31 +15,31 @@ references:
22
15
 
23
16
  npm_cache_keys: &npm_cache_keys
24
17
  keys:
25
- - v3-dependency-npm-{{ checksum "package.json" }}-
26
- - v3-dependency-npm-{{ checksum "package.json" }}
27
- - v3-dependency-npm-
18
+ - v8-dependency-npm-{{ checksum "package-lock.json" }}-
19
+ - v8-dependency-npm-{{ checksum "package-lock.json" }}
20
+ - v8-dependency-npm-
28
21
 
29
22
  cache_npm_cache: &cache_npm_cache
30
23
  save_cache:
31
- key: v3-dependency-npm-{{ checksum "package.json" }}-{{ epoch }}
32
- paths:
24
+ key: v8-dependency-npm-{{ checksum "package-lock.json" }}-{{ epoch }}
25
+ paths:
33
26
  - ./node_modules/
34
27
 
35
28
  restore_npm_cache: &restore_npm_cache
36
29
  restore_cache:
37
- <<: *npm_cache_keys
30
+ <<: *npm_cache_keys
38
31
 
39
32
  filters_ignore_gh_pages: &filters_ignore_gh_pages
40
33
  branches:
41
34
  ignore: gh_pages
42
35
 
43
- filters_only_master: &filters_only_master
36
+ filters_only_main: &filters_only_main
44
37
  branches:
45
- only: master
38
+ only: main
46
39
 
47
- filters_ignore_master: &filters_ignore_master
40
+ filters_ignore_main: &filters_ignore_main
48
41
  branches:
49
- ignore: master
42
+ ignore: main
50
43
 
51
44
  filters_ignore_tags: &filters_ignore_tags
52
45
  tags:
@@ -59,14 +52,18 @@ references:
59
52
  branches:
60
53
  ignore: /.*/
61
54
 
62
- version: 2
55
+ version: 2.1
63
56
 
64
- jobs:
57
+ orbs:
58
+ node: circleci/node@4.6.0
65
59
 
60
+ jobs:
66
61
  build:
67
- <<: *container_config_node12
62
+ <<: *container_config_node
68
63
  steps:
69
64
  - checkout
65
+ - node/install-npm:
66
+ version: "7"
70
67
  - run:
71
68
  name: Checkout next-ci-shared-helpers
72
69
  command: git clone --depth 1 git@github.com:Financial-Times/next-ci-shared-helpers.git .circleci/shared-helpers
@@ -74,9 +71,6 @@ jobs:
74
71
  - run:
75
72
  name: Install project dependencies
76
73
  command: make install
77
- - run:
78
- name: shared-helper / npm-install-peer-deps
79
- command: .circleci/shared-helpers/helper-npm-install-peer-deps
80
74
  - run:
81
75
  name: shared-helper / npm-update
82
76
  command: .circleci/shared-helpers/helper-npm-update
@@ -94,7 +88,7 @@ jobs:
94
88
  - build
95
89
 
96
90
  test:
97
- <<: *container_config_node12
91
+ <<: *container_config_node
98
92
  parallelism: 1
99
93
  steps:
100
94
  - *attach_workspace
@@ -111,7 +105,7 @@ jobs:
111
105
  destination: test-results
112
106
 
113
107
  publish:
114
- <<: *container_config_node12
108
+ <<: *container_config_node
115
109
  steps:
116
110
  - *attach_workspace
117
111
  - run:
@@ -123,7 +117,7 @@ jobs:
123
117
  command: .circleci/shared-helpers/helper-npm-version-and-publish-public
124
118
 
125
119
  deploy:
126
- <<: *container_config_node12
120
+ <<: *container_config_node
127
121
  steps:
128
122
  - *attach_workspace
129
123
  - add_ssh_keys:
@@ -149,7 +143,7 @@ workflows:
149
143
  - build
150
144
  - deploy:
151
145
  filters:
152
- <<: *filters_only_master
146
+ <<: *filters_only_main
153
147
  requires:
154
148
  - build
155
149
  build-test-publish:
@@ -173,7 +167,7 @@ workflows:
173
167
  - schedule:
174
168
  cron: "0 0 * * *"
175
169
  filters:
176
- <<: *filters_only_master
170
+ <<: *filters_only_main
177
171
  jobs:
178
172
  - build:
179
173
  context: next-nightly-build
@@ -11,10 +11,10 @@
11
11
  #
12
12
  # Why we pass the flags we do to `npm install`:
13
13
  #
14
- # --no-package-lock - While we now use package-lock.json
15
- # in our repos, skip package-lock.json in this instance
16
- # as we don't want to accidentally modify the file
17
- # for subsequent steps in the workflow, e.g cache keys
14
+ # --no-package-lock - While we now use package-lock.json
15
+ # in our repos, skip package-lock.json in this instance
16
+ # as we don't want to accidentally modify the file
17
+ # for subsequent steps in the workflow, e.g cache keys
18
18
  # and artefact generation.
19
19
  #
20
20
  # --no-save - We don't want to modify package.json as we
@@ -34,6 +34,7 @@ if [ -e package.json ]; then
34
34
 
35
35
  npm ls --production --parseable 2>&1 >/dev/null | \
36
36
  sed -n -e 's/^npm ERR! peer dep missing: \(.*\),.*/\1/p' | \
37
- xargs -I{} npm install --no-package-lock --no-save "{}"
37
+ xargs -I{} echo -n '"{}" ' | \
38
+ xargs npm install --no-package-lock --no-save
38
39
 
39
40
  fi
@@ -1,7 +1,7 @@
1
1
  _extends: github-apps-config-next
2
2
 
3
3
  branches:
4
- - name: master
4
+ - name: main
5
5
  protection:
6
6
  required_pull_request_reviews: null
7
7
  required_status_checks:
package/.scss-lint.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  linters:
2
-
3
2
  # Documentation:
4
- # https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md
3
+ # https://github.com/causes/scss-lint/blob/HEAD/lib/scss_lint/linter/README.md
5
4
 
6
5
  # "value !important;" not "value!important ;"
7
6
  BangFormat:
@@ -262,7 +261,8 @@ linters:
262
261
  enabled: true
263
262
  identifier_list: base
264
263
  additional_identifiers: []
265
- excluded_identifiers: ["user-select", "appearance", "font-smoothing", "osx-font-smoothing"]
264
+ excluded_identifiers:
265
+ ["user-select", "appearance", "font-smoothing", "osx-font-smoothing"]
266
266
  severity: warning
267
267
 
268
268
  # No units on zero values: 0 not 0px
package/Makefile CHANGED
@@ -46,3 +46,4 @@ test:
46
46
  make test-unit
47
47
  make test-build
48
48
  make a11y
49
+ jest
package/README.md CHANGED
@@ -16,22 +16,25 @@ These subdirectories may contain a README. If not, please speak to the myft team
16
16
  n-myft-ui provides the CSS, JS and most templates for the myFT components on FT.com. We use semver to control rollout of the code.
17
17
 
18
18
  As of August 2017, The following apps use n-myft-ui:
19
- * next-front-page
20
- * next-stream-page
21
- * next-article
22
- * next-myft-page
23
- * next-tour-page
24
- * next-video-page
25
- * next-search-page
26
19
 
27
- When you merge to master, you should make a new release and then roll it out to the apps, plus n-topic-card which contains a reference to this so that there aren't missing dependencies.
20
+ - next-front-page
21
+ - next-stream-page
22
+ - next-article
23
+ - next-myft-page
24
+ - next-tour-page
25
+ - next-video-page
26
+ - next-search-page
27
+
28
+ When you merge to main, you should make a new release and then roll it out to the apps, plus n-topic-card which contains a reference to this so that there aren't missing dependencies.
28
29
 
29
30
  If you are making a major change, you will need to update the bower.json and package.json files for the above apps. For minor and patch updates, you can rebuild without cache from CircleCI.
30
31
 
31
32
  ## Running locally
33
+
32
34
  ```
33
35
  make install
34
36
  make build
35
37
  make demo
36
38
  ```
39
+
37
40
  View the demo on `localhost:5005`