Skip to content

Commit

Permalink
Merge remote-tracking branch 'algoliasearch-helper/develop' into feat…
Browse files Browse the repository at this point in the history
…/import-algoliasearch-helper
  • Loading branch information
dhayab committed Jul 10, 2023
2 parents 7e2c8a2 + 5daa9f3 commit c2c01e2
Show file tree
Hide file tree
Showing 237 changed files with 49,066 additions and 0 deletions.
99 changes: 99 additions & 0 deletions packages/algoliasearch-helper/.circleci/config.yml
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
7 changes: 7 additions & 0 deletions packages/algoliasearch-helper/.codesandbox/ci.json
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"
}
5 changes: 5 additions & 0 deletions packages/algoliasearch-helper/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
documentation-src/
documentation/
scripts/rollup.esm.config.js
*.ts
48 changes: 48 additions & 0 deletions packages/algoliasearch-helper/.eslintrc.js
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;
2 changes: 2 additions & 0 deletions packages/algoliasearch-helper/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Introduced prettier
cc83731fc794a45d05b915e7419c59f25eb812c5
34 changes: 34 additions & 0 deletions packages/algoliasearch-helper/.gitignore
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
1 change: 1 addition & 0 deletions packages/algoliasearch-helper/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.18.0
1 change: 1 addition & 0 deletions packages/algoliasearch-helper/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
documentation-src/partials
5 changes: 5 additions & 0 deletions packages/algoliasearch-helper/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"proseWrap": "never",
"trailingComma": "es5"
}
Loading

0 comments on commit c2c01e2

Please sign in to comment.