Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rendez committed Apr 18, 2023
0 parents commit 55ba6a3
Show file tree
Hide file tree
Showing 79 changed files with 18,678 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
51 changes: 51 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pull request

on:
pull_request:
branches: [master]

jobs:
precheck:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
with:
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Node packages audit
run: pnpm audit

- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
CI: 1

- name: Check PR contains changeset
run: pnpm changeset status --since=origin/master

- name: Open API schema changes
run: |
pnpm --filter "@qdrant/js-client-rest" codegen:openapi-typescript
if ( git diff-index HEAD | grep -q README.md || exit ) then
echo "Generated schema changed. Please update with pnpm -r codegen:openapi-typescript.";
exit 1
fi
- name: Run checks
run: pnpm -r pre-check

- name: Open API integration tests
run: cd packages/js-client-rest && ./tests/integration-tests.sh
54 changes: 54 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
branches: [master]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
scope: "@qdrant"
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Node packages audit
run: pnpm audit

- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
env:
CI: 1

- name: Add registry path to .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**/yarn.lock
**/package-lock.json
**/node_modules/
**/.pnpm-store/
**/*.env
**/*.log
**/.DS_Store
**/.idea
**/.vscode/*
!.vscode/settings.json
**/*.tsbuildinfo
**/dist
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm -r pre-commit
7 changes: 7 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
loglevel = warn
save-exact = true
engine-strict = true
node-version=18.0.0
strict-peer-dependencies = true
auto-install-peers = true
lockfile = true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.0.0
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules/
**/dist/
**/src/openapi/
**/src/proto/
**/pnpm-lock.yaml
10 changes: 10 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tabWidth: 4
singleQuote: true
printWidth: 120
trailingComma: all
bracketSpacing: false
overrides:
- files: "*.yaml"
options:
tabWidth: 2
singleQuote: false
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.workingDirectories": ["packages/js-client-rest", "packages/js-client-grpc"]
}
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to Qdrant-JS

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features

## We Develop with Github

We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests

Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If the Qdrant Open API has changed, update it with: `codegen:openapi-typescript`.
4. Make sure your code lints: `pnpm pre-check`. The root package installs a `pre-commit` hook with [husky](https://github.com/typicode/husky/) to automate this check.
5. Ensure the test suite passes: `pnpm test`.
6. Ensure the integration test suite passes: `pnpm test:integration`.
7. When ready, use [Changesets](https://github.com/changesets/changesets): `pnpm changeset` to describe the change(s). The generated markdown files in the `.changeset` directory should be committed to the repository.
8. Issue that pull request!

## Any contributions you make will be under the Apache License 2.0

In short, when you submit code changes, your submissions are understood to be under the same [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/qdrant/qdrant-js/issues)

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

## Use a Consistent Coding Style

If you are modifying TypeScript code, make sure it has no warnings from ESLint or Prettier.
The project uses the [eslint](https://eslint.org/) formatter together with prettier. Please ensure your code editor is appropriately configured to handle mono-repo projects.

## License

By contributing, you agree that your contributions will be licensed under its Apache License 2.0.
Loading

0 comments on commit 55ba6a3

Please sign in to comment.