Skip to content

Commit

Permalink
Merge pull request #361 from tigrisdata/main
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
ovaistariq authored May 9, 2023
2 parents 123c608 + c972224 commit 54157d8
Show file tree
Hide file tree
Showing 104 changed files with 8,842 additions and 4,033 deletions.
9 changes: 6 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,24 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "functional", "unused-imports"],
"plugins": ["@typescript-eslint", "functional", "unused-imports", "eslint-plugin-tsdoc"],
"rules": {
"unicorn/prevent-abbreviations": "off",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/ban-types": [
"error",
{
"types": { "BigInt": false },
"types": { "BigInt": false, "Function": false, "Object": false },
"extendDefaults": true
}
],
"@typescript-eslint/semi": ["error"],
"unused-imports/no-unused-imports": "error",
"quotes": "off",
"@typescript-eslint/quotes": ["error"]
"unicorn/expiring-todo-comments": "off",
"unicorn/prefer-node-protocol": "off",
"@typescript-eslint/quotes": ["error"],
"tsdoc/syntax": "error"
},
"ignorePatterns": ["src/__tests__/*", "dist/*"]
}
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Bug report
about: File a bug
title: "[BUG]: <replace title>"
labels: bug
assignees: ""
---

# Prerequisites

Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.**

- [ ] I am running the latest version
- [ ] I checked the documentation and found no answer
- [ ] I checked to make sure that this issue has not already been filed

# Expected Behavior

Please describe the behavior you are expecting

# Current Behavior

What is the current behavior?

# Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

## Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1. step 1
2. step 2
3. you get it...

## Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

> You can find Tigris SDK version on your local dev project by executing `npm list | grep "tigrisdata/core"`
- [Tigris SDK version](https://www.npmjs.com/package/@tigrisdata/core?activeTab=versions):
- Operating System:

## Failure Logs

Please include any relevant log snippets or files here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ""
labels: ""
assignees: ""
---
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
49 changes: 49 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update

## Description

## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them
below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
For example having the text: "closes #1234" would connect the current pull
request to issue 1234. And when we merge the pull request, Github will
automatically close the issue.
-->

- Related Issue #
- Closes #

## Added/updated tests?

- [ ] Yes
- [ ] No, and this is why: _please replace this line with details on why tests
have not been included_
- [ ] I need help with writing tests

### Is this change backwards compatible?

- [ ] Yes
- [ ] No, and this is why: _please replace this line with details on why?_

### Does it require updates to [Tigris docs](https://docs.tigrisdata.com/)?

- [ ] Yes, and here is the link: _please create an issue in [tigris-docs](https://github.com/tigrisdata/tigris-docs/issues) repo
and replace this text as `tigrisdata/tigris-docs#123`_
- [ ] No

### Checklist

- [ ] `npm run build` - builds successfully
- [ ] `npm run test` - tests passing
- [ ] `npm run lint` - no lint errors

## [optional] Are there any post deployment tasks we need to perform?
16 changes: 6 additions & 10 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: release-test
on:
pull_request_target:
pull_request:
types:
- "opened"
- "reopened"
Expand All @@ -17,17 +17,13 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build package
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install semantic-release
run: |
npm install --no-package-lock --no-save \
@semantic-release/commit-analyzer \
@semantic-release/release-notes-generator \
@semantic-release/github
- name: Verify the signatures for installed dependencies
run: npm audit signatures
- name: Release dry run
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --debug --dryRun
run: npx semantic-release@18 --debug --dryRun
19 changes: 7 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm run clean
- run: |
npm install
npx eslint .
npm run build
- run: npm ci
- run: npm run lint
- run: npm run prettier-check
- run: npm run build
- run: npm run test

release:
Expand All @@ -35,17 +34,13 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Build package
run: npm ci
- name: Install semantic-release
run: |
npm install --no-package-lock --no-save \
@semantic-release/commit-analyzer \
@semantic-release/release-notes-generator \
@semantic-release/github
- name: Verify the signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --debug
run: npx semantic-release@18 --debug
18 changes: 13 additions & 5 deletions .github/workflows/ts-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: ts-ci

on: [push]
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
push:
branches:
- main

jobs:
build:
Expand All @@ -17,10 +24,11 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm run clean
- run: |
npm install
npx eslint .
npm run build
- name: Clean install
run: npm ci
- run: npm run lint
- run: npm run prettier-check
- run: npm run build
- run: npm run test -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Ignore artifacts:
dist/
src/__tests__/
src/proto/
api/
coverage/
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Tigris TypeScript Client Library

[![npm](https://img.shields.io/npm/v/@tigrisdata/core)](https://www.npmjs.com/package/@tigrisdata/core)
[![ts-ci](https://github.com/tigrisdata/tigris-client-ts/actions/workflows/ts-ci.yml/badge.svg?branch=main)](https://github.com/tigrisdata/tigris-client-ts/actions/workflows/ts-ci.yml)
[![npm](https://img.shields.io/npm/v/@tigrisdata/core?logo=npm&logoColor=white)](https://www.npmjs.com/package/@tigrisdata/core)
[![build](https://github.com/tigrisdata/tigris-client-ts/actions/workflows/ts-ci.yml/badge.svg?branch=main)](https://github.com/tigrisdata/tigris-client-ts/actions/workflows/ts-ci.yml)
[![codecov](https://codecov.io/gh/tigrisdata/tigris-client-ts/branch/main/graph/badge.svg)](https://codecov.io/gh/tigrisdata/tigris-client-ts)
![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/github/tigrisdata/tigris-client-ts)
[![slack](https://img.shields.io/badge/slack-tigrisdata-34D058.svg?logo=slack)](https://tigrisdata.slack.com)
[![GitHub](https://img.shields.io/github/license/tigrisdata/tigris-client-ts)](https://github.com/tigrisdata/tigris-client-ts/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/1033842669983633488?color=%23596fff&label=Discord&logo=discord&logoColor=%23ffffff)](https://tigris.dev/discord)
[![Twitter Follow](https://img.shields.io/twitter/follow/tigrisdata?style=social)](https://twitter.com/tigrisdata)

# Documentation

- [Tigris Overview](https://docs.tigrisdata.com/overview/)
- [Getting Started](https://docs.tigrisdata.com/typescript/getting-started)
- [CRUD operations API](https://docs.tigrisdata.com/typescript/documents)
- [Event Streaming API](https://docs.tigrisdata.com/typescript/event_streaming)
- [Tigris Overview](https://www.tigrisdata.com/docs/concepts/)
- [Getting Started](https://www.tigrisdata.com/docs/quickstarts/quickstart-typescript/)
- [Database](https://www.tigrisdata.com/docs/sdkstools/typescript/database/)
- [Database + Search](https://www.tigrisdata.com/docs/sdkstools/typescript/database/search/)
- [Search Only](https://www.tigrisdata.com/docs/sdkstools/typescript/search/)
- [Vector Search](https://www.tigrisdata.com/docs/quickstarts/quickstart-vector-search/)

# Building

Expand All @@ -32,8 +34,8 @@ npm run lint

# Installation note for Apple M1

Since ARM binaries are not provided for `grpc-tools` package by the grpc team. Hence, the x86_64
version of `grpc-tools` must be installed.
Since ARM binaries are not provided for `grpc-tools` package by the grpc
team. Hence, the x86_64 version of `grpc-tools` must be installed.

```shell
npm_config_target_arch=x64 npm i grpc-tools
Expand Down Expand Up @@ -63,3 +65,11 @@ On every `git commit` we check the code quality using prettier and eslint.
# License

This software is licensed under the [Apache 2.0](LICENSE).

# Contributors

Thanks to all the people who contributed!

<a href="https://github.com/tigrisdata/tigris-client-ts/graphs/contributors">
<img src="https://contrib.rocks/image?repo=tigrisdata/tigris-client-ts" />
</a>
2 changes: 1 addition & 1 deletion api/proto
Submodule proto updated from 49dd11 to f346cf
10 changes: 9 additions & 1 deletion jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@
"collectCoverage": true,
"coverageDirectory": "coverage",
"coverageProvider": "v8",
"collectCoverageFrom": ["src/*.ts", "src/consumables/*.ts", "src/utils/*.ts", "src/search/*.ts"]
"coveragePathIgnorePatterns": ["<rootDir>/src/decorators/metadata/*.ts"],
"collectCoverageFrom": [
"src/*.ts",
"src/consumables/*.ts",
"src/decorators/*.ts",
"src/schema/**/*.ts",
"src/search/**/*.ts",
"src/utils/**/*.ts"
]
}
Loading

0 comments on commit 54157d8

Please sign in to comment.