Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 781642b

Browse files
authored
feat: check for compatibility with current LTS versions of node (#569)
* feat: check for compatibility with current LTS versions of node BREAKING CHANGE: compatibility with versions that are EOL (up to 12) is not guaranteed * remove terminal colors from unit test snapshots
1 parent 9efba7c commit 781642b

File tree

6 files changed

+34
-28
lines changed

6 files changed

+34
-28
lines changed

.circleci/config.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ aliases:
2525
defaults: &defaults
2626
working_directory: ~/create-instantsearch-app
2727
docker:
28-
- image: cimg/node:12.22
28+
- image: cimg/node:16.15
2929

3030
executors:
31-
node10:
31+
node14:
3232
docker:
33-
- image: cimg/node:10.24
34-
node12:
33+
- image: cimg/node:14.19
34+
node16:
3535
docker:
36-
- image: cimg/node:12.22
36+
- image: cimg/node:16.15
3737

3838
commands:
3939
build_app:
@@ -88,17 +88,20 @@ jobs:
8888
name: End-to-end tests
8989
command: yarn run test:e2e --maxWorkers=4
9090

91-
test_apps_node_10:
92-
executor: node10
91+
test_apps_node_14:
92+
executor: node14
9393
steps:
9494
- checkout
9595
- run: *install_yarn_version
9696
- restore_cache: *restore_yarn_cache
9797
- run: *run_yarn_install
9898
- save_cache: *save_yarn_cache
9999
- build_app:
100-
template: 'Autocomplete.js 0'
101-
app: 'autocomplete.js'
100+
template: 'Angular InstantSearch'
101+
app: 'angular-instantsearch'
102+
- build_app:
103+
template: 'Autocomplete'
104+
app: 'autocomplete'
102105
- build_app:
103106
template: 'InstantSearch.js'
104107
app: 'instantsearch.js'
@@ -108,15 +111,18 @@ jobs:
108111
- build_app:
109112
template: 'JavaScript Helper'
110113
app: 'javascript-helper'
111-
# - build_app:
112-
# template: 'React InstantSearch'
113-
# app: 'react-instantsearch'
114+
- build_app:
115+
template: 'React InstantSearch'
116+
app: 'react-instantsearch'
114117
- build_app:
115118
template: 'Vue InstantSearch'
116119
app: 'vue-instantsearch'
120+
- build_app:
121+
template: 'Vue InstantSearch with Vue 3'
122+
app: 'vue-instantsearch-vue3'
117123

118-
test_apps_node_12:
119-
executor: node12
124+
test_apps_node_16:
125+
executor: node16
120126
steps:
121127
- checkout
122128
- run: *install_yarn_version
@@ -126,9 +132,6 @@ jobs:
126132
- build_app:
127133
template: 'Angular InstantSearch'
128134
app: 'angular-instantsearch'
129-
- build_app:
130-
template: 'Autocomplete.js 0'
131-
app: 'autocomplete.js'
132135
- build_app:
133136
template: 'Autocomplete'
134137
app: 'autocomplete'
@@ -147,6 +150,9 @@ jobs:
147150
- build_app:
148151
template: 'Vue InstantSearch'
149152
app: 'vue-instantsearch'
153+
- build_app:
154+
template: 'Vue InstantSearch with Vue 3'
155+
app: 'vue-instantsearch-vue3'
150156

151157
workflows:
152158
version: 2.1
@@ -155,5 +161,5 @@ workflows:
155161
- test_lint
156162
- test_unit
157163
- test_e2e
158-
- test_apps_node_10
159-
- test_apps_node_12
164+
- test_apps_node_14
165+
- test_apps_node_16

docs/deploy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Your app can be deployed in a single command, assuming you're located in its fol
1313

1414
- [CodeSandbox](#codesandbox)
1515
- [Surge](#surge)
16-
- [Now](#now)
16+
- [Vercel](#vercel)
1717

1818
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1919

@@ -35,10 +35,10 @@ npx surge
3535

3636
[Learn more about Surge →](https://surge.sh)
3737

38-
## Now
38+
## Vercel
3939

4040
```
41-
npx now .
41+
npx vercel
4242
```
4343

44-
[Learn more about Now](https://zeit.co/now)
44+
[Learn more about Vercel](https://vercel.com)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"start": "node src/cli/index.js",
18-
"test": "jest src",
18+
"test": "jest --no-color src",
1919
"test:e2e:templates": "jest e2e/templates.test.js",
2020
"test:e2e:installs": "jest e2e/installs.test.js",
2121
"test:e2e": "yarn run test:e2e:templates && yarn run test:e2e:installs",

src/api/__tests__/__snapshots__/index.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Options with invalid name throws 1`] = `
4-
"Could not create a project called \\"[31m./WrongNpmName[39m\\" because of npm naming restrictions.
4+
"Could not create a project called \\"./WrongNpmName\\" because of npm naming restrictions.
55
- name cannot start with a period
66
- name can only contain URL-friendly characters"
77
`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`checkAppName throws with correct error message 1`] = `
4-
"Could not create a project called \\"[31m./project-name[39m\\" because of npm naming restrictions.
4+
"Could not create a project called \\"./project-name\\" because of npm naming restrictions.
55
- name cannot start with a period
66
- name can only contain URL-friendly characters"
77
`;

src/utils/__tests__/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('checkAppPath', () => {
4848
expect(() =>
4949
utils.checkAppPath('path')
5050
).toThrowErrorMatchingInlineSnapshot(
51-
`"Could not create project in destination folder \\"[31mpath[39m\\" because it is not empty."`
51+
`"Could not create project in destination folder \\"path\\" because it is not empty."`
5252
);
5353
});
5454

@@ -71,7 +71,7 @@ describe('checkAppPath', () => {
7171
expect(() =>
7272
utils.checkAppPath('path')
7373
).toThrowErrorMatchingInlineSnapshot(
74-
`"Could not create project at path [31mpath[39m because a file of the same name already exists."`
74+
`"Could not create project at path path because a file of the same name already exists."`
7575
);
7676
});
7777

0 commit comments

Comments
 (0)