Skip to content

Commit

Permalink
Release 1.0.2 (#30)
Browse files Browse the repository at this point in the history
* Prettifying

* patch & changelog
  • Loading branch information
erikengervall authored Nov 28, 2019
1 parent a34eb46 commit 39659a6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2019-11-28

### Added

- Allow for specifying subjects explicitly [#19](https://github.com/kafkajs/confluent-schema-registry/pull/19)

### Fixed

- Fix `@types/jest` issue [#29](https://github.com/kafkajs/confluent-schema-registry/pull/29)
- Fix `es-abstract` version issue [28](https://github.com/kafkajs/confluent-schema-registry/pull/28)

## [1.0.1] - 2019-10-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kafkajs/confluent-schema-registry",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.js",
"description": "ConfluentSchemaRegistry is a library that makes it easier to interact with the Confluent schema registry, it provides convenient methods to encode, decode and register new schemas using the Apache Avro serialization format.",
"keywords": [
Expand Down
5 changes: 3 additions & 2 deletions src/SchemaRegistry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ describe('SchemaRegistry', () => {

it('fetch and validate the latest schema id after registering a new schema', async () => {
const { id } = await schemaRegistry.register(Schema)
const latestSchemaId = await schemaRegistry.getLatestSchemaId(subject);
expect(id).toBe(latestSchemaId);
const latestSchemaId = await schemaRegistry.getLatestSchemaId(subject)

expect(id).toBe(latestSchemaId)
})

it('set the default compatibility to BACKWARD', async () => {
Expand Down
7 changes: 3 additions & 4 deletions src/SchemaRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ export default class SchemaRegistry {
throw new ConfluentSchemaRegistryArgumentError(`Invalid namespace: ${schema.namespace}`)
}

/* !note: allow user to decide the subject name */
let subject: string;
let subject: string
if (userOpts && userOpts.subject) {
subject = userOpts.subject
subject = userOpts.subject
} else {
subject = [schema.namespace, schema.name].join(separator)
subject = [schema.namespace, schema.name].join(separator)
}

try {
Expand Down
15 changes: 10 additions & 5 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ This website was created with [Docusaurus](https://docusaurus.io/).

# What's In This Document

* [Get Started in 5 Minutes](#get-started-in-5-minutes)
* [Directory Structure](#directory-structure)
* [Editing Content](#editing-content)
* [Adding Content](#adding-content)
* [Full Documentation](#full-documentation)
- [Get Started in 5 Minutes](#get-started-in-5-minutes)
- [Directory Structure](#directory-structure)
- [Editing Content](#editing-content)
- [Adding Content](#adding-content)
- [Full Documentation](#full-documentation)

# Get Started in 5 Minutes

Expand All @@ -16,6 +16,7 @@ This website was created with [Docusaurus](https://docusaurus.io/).
# Install dependencies
$ yarn
```

2. Run your dev server:

```sh
Expand Down Expand Up @@ -72,6 +73,7 @@ For more information about docs, click [here](https://docusaurus.io/docs/en/navi
Edit blog posts by navigating to `website/blog` and editing the corresponding post:

`website/blog/post-to-be-edited.md`

```markdown
---
id: post-needs-edit
Expand Down Expand Up @@ -121,6 +123,7 @@ For more information about adding new docs, click [here](https://docusaurus.io/d
1. Make sure there is a header link to your blog in `website/siteConfig.js`:

`website/siteConfig.js`

```javascript
headerLinks: [
...
Expand Down Expand Up @@ -151,6 +154,7 @@ For more information about blog posts, click [here](https://docusaurus.io/docs/e
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:

`website/siteConfig.js`

```javascript
{
headerLinks: [
Expand All @@ -175,6 +179,7 @@ For more information about the navigation bar, click [here](https://docusaurus.i
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:

`website/siteConfig.js`

```javascript
{
headerLinks: [
Expand Down

0 comments on commit 39659a6

Please sign in to comment.