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

feat: check for compatibility with current LTS versions of node #569

Merged
merged 2 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ aliases:
defaults: &defaults
working_directory: ~/create-instantsearch-app
docker:
- image: cimg/node:12.22
- image: cimg/node:16.15

executors:
node10:
node14:
docker:
- image: cimg/node:10.24
node12:
- image: cimg/node:14.19
node16:
docker:
- image: cimg/node:12.22
- image: cimg/node:16.15

commands:
build_app:
Expand Down Expand Up @@ -88,17 +88,20 @@ jobs:
name: End-to-end tests
command: yarn run test:e2e --maxWorkers=4

test_apps_node_10:
executor: node10
test_apps_node_14:
executor: node14
steps:
- checkout
- run: *install_yarn_version
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- build_app:
template: 'Autocomplete.js 0'
app: 'autocomplete.js'
template: 'Angular InstantSearch'
app: 'angular-instantsearch'
- build_app:
template: 'Autocomplete'
app: 'autocomplete'
- build_app:
template: 'InstantSearch.js'
app: 'instantsearch.js'
Expand All @@ -108,15 +111,18 @@ jobs:
- build_app:
template: 'JavaScript Helper'
app: 'javascript-helper'
# - build_app:
# template: 'React InstantSearch'
# app: 'react-instantsearch'
- build_app:
template: 'React InstantSearch'
app: 'react-instantsearch'
- build_app:
template: 'Vue InstantSearch'
app: 'vue-instantsearch'
- build_app:
template: 'Vue InstantSearch with Vue 3'
app: 'vue-instantsearch-vue3'

test_apps_node_12:
executor: node12
test_apps_node_16:
executor: node16
steps:
- checkout
- run: *install_yarn_version
Expand All @@ -126,9 +132,6 @@ jobs:
- build_app:
template: 'Angular InstantSearch'
app: 'angular-instantsearch'
- build_app:
template: 'Autocomplete.js 0'
app: 'autocomplete.js'
- build_app:
template: 'Autocomplete'
app: 'autocomplete'
Expand All @@ -147,6 +150,9 @@ jobs:
- build_app:
template: 'Vue InstantSearch'
app: 'vue-instantsearch'
- build_app:
template: 'Vue InstantSearch with Vue 3'
app: 'vue-instantsearch-vue3'

workflows:
version: 2.1
Expand All @@ -155,5 +161,5 @@ workflows:
- test_lint
- test_unit
- test_e2e
- test_apps_node_10
- test_apps_node_12
- test_apps_node_14
- test_apps_node_16
8 changes: 4 additions & 4 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Your app can be deployed in a single command, assuming you're located in its fol

- [CodeSandbox](#codesandbox)
- [Surge](#surge)
- [Now](#now)
- [Vercel](#vercel)

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

Expand All @@ -35,10 +35,10 @@ npx surge

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

## Now
## Vercel

```
npx now .
npx vercel
```

[Learn more about Now →](https://zeit.co/now)
[Learn more about Vercel →](https://vercel.com)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"scripts": {
"start": "node src/cli/index.js",
"test": "jest src",
"test": "jest --no-color src",
"test:e2e:templates": "jest e2e/templates.test.js",
"test:e2e:installs": "jest e2e/installs.test.js",
"test:e2e": "yarn run test:e2e:templates && yarn run test:e2e:installs",
Expand Down
2 changes: 1 addition & 1 deletion src/api/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Options with invalid name throws 1`] = `
"Could not create a project called \\"./WrongNpmName\\" because of npm naming restrictions.
"Could not create a project called \\"./WrongNpmName\\" because of npm naming restrictions.
- name cannot start with a period
- name can only contain URL-friendly characters"
`;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`checkAppName throws with correct error message 1`] = `
"Could not create a project called \\"./project-name\\" because of npm naming restrictions.
"Could not create a project called \\"./project-name\\" because of npm naming restrictions.
- name cannot start with a period
- name can only contain URL-friendly characters"
`;
4 changes: 2 additions & 2 deletions src/utils/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('checkAppPath', () => {
expect(() =>
utils.checkAppPath('path')
).toThrowErrorMatchingInlineSnapshot(
`"Could not create project in destination folder \\"path\\" because it is not empty."`
`"Could not create project in destination folder \\"path\\" because it is not empty."`
);
});

Expand All @@ -71,7 +71,7 @@ describe('checkAppPath', () => {
expect(() =>
utils.checkAppPath('path')
).toThrowErrorMatchingInlineSnapshot(
`"Could not create project at path path because a file of the same name already exists."`
`"Could not create project at path path because a file of the same name already exists."`
);
});

Expand Down