-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'algoliasearch-helper/develop' into feat…
…/import-algoliasearch-helper
- Loading branch information
Showing
237 changed files
with
49,066 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
aliases: | ||
- &install_yarn_version | ||
name: Install specific Yarn version | ||
command: | | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 | ||
echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV | ||
- &restore_yarn_cache | ||
name: Restore Yarn cache | ||
keys: | ||
- yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }} | ||
|
||
- &save_yarn_cache | ||
name: Save Yarn cache | ||
key: yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ~/.cache/yarn | ||
|
||
- &run_yarn_install | ||
name: Install dependencies | ||
command: yarn install | ||
|
||
defaults: &defaults | ||
working_directory: ~/algoliasearch-helper-js | ||
docker: | ||
- image: cimg/node:14.18.0 | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Build | ||
command: yarn build | ||
|
||
test: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Lint & Code styles | ||
command: yarn lint | ||
- run: | ||
name: Unit & Integration Tests | ||
command: yarn test --maxWorkers=4 | ||
- run: | ||
name: Type checking | ||
command: yarn tsc | ||
|
||
'test algoliasearch v3': | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Install algoliasearch v3 | ||
command: yarn add --dev [email protected] @types/[email protected] | ||
- run: | ||
name: Unit & Integration Tests | ||
command: yarn test --maxWorkers=4 | ||
- run: | ||
name: Type checking | ||
command: yarn tsc | ||
|
||
docs: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Build documentation | ||
command: yarn doc | ||
- store_artifacts: | ||
path: documentation | ||
|
||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- build | ||
- test | ||
- test algoliasearch v3 | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"sandboxes": [ | ||
"github/algolia/create-instantsearch-app/tree/templates/javascript-helper", | ||
"instantsearchjs-es-template-pcw1k" | ||
], | ||
"node": "14" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dist/ | ||
documentation-src/ | ||
documentation/ | ||
scripts/rollup.esm.config.js | ||
*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* @type {import('eslint').Linter.Config} | ||
*/ | ||
const config = { | ||
extends: [ | ||
'algolia', | ||
'algolia/jest', | ||
'algolia/react', | ||
'algolia/typescript', | ||
'plugin:react-hooks/recommended', | ||
], | ||
overrides: [ | ||
{ | ||
// TODO: should be scoped to helper folder once in monorepo | ||
files: ['*.js'], | ||
rules: { | ||
// Helper uses CommonJS for now | ||
'import/no-commonjs': 'off', | ||
strict: 'off', | ||
// Helper uses ES5 for now | ||
'no-var': 'off', | ||
'vars-on-top': 'off', | ||
'object-shorthand': 'off', | ||
'prefer-template': 'off', | ||
'prefer-spread': 'off', | ||
'prefer-rest-params': 'off', | ||
}, | ||
}, | ||
{ | ||
// TODO: should be scoped to helper folder once in monorepo | ||
files: ['test/**/*.js'], | ||
rules: { | ||
'no-console': 'off', | ||
'jest/no-done-callback': 'off', | ||
'jest/no-conditional-expect': 'off', | ||
}, | ||
env: { | ||
jest: true, | ||
}, | ||
globals: { | ||
test: true, | ||
beforeAll: true, | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Introduced prettier | ||
cc83731fc794a45d05b915e7419c59f25eb812c5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# Commenting this out is preferred by some people, see | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- | ||
node_modules | ||
|
||
# Users Environment Variables | ||
.lock-wscript | ||
|
||
# Built documentation folder, tracked in gh-pages | ||
documentation | ||
|
||
dist | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
documentation-src/partials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"proseWrap": "never", | ||
"trailingComma": "es5" | ||
} |
Oops, something went wrong.