Skip to content

Commit

Permalink
revert export to var. renamed to AzureTableAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
howlowck committed Jan 4, 2022
1 parent ac57f2e commit edb82ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keyv-azuretable",
"version": "1.1.1",
"version": "1.2.0",
"description": "",
"main": "dist/cjs/index.js",
"types": "dist/types/index.d.js",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ const resourceNotFound = (error: ClientError) => {
}

type KeyvConfig = {
store: AzureTable
store: AzureTableAdapter
namespace: string
}

class AzureTable extends EventEmitter {
class AzureTableAdapter extends EventEmitter {
private client: TableClient
private namespace: string

Expand Down Expand Up @@ -140,4 +140,4 @@ class AzureTable extends EventEmitter {
}
}

export default AzureTable
export { AzureTableAdapter }
16 changes: 8 additions & 8 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import AzureTable from '../src/index'
import { AzureTableAdapter } from '../src/index'
import Keyv from 'keyv'

const { AZURE_TABLE_CONNECTION_STRING } = process.env
const localTestConnectionString = AZURE_TABLE_CONNECTION_STRING as string

test('can store and retrieve a string', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand All @@ -20,7 +20,7 @@ test('can store and retrieve a string', async () => {
})

test('can store and retrieve an object', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand All @@ -41,7 +41,7 @@ test('can store and retrieve an object', async () => {
})

test('(namespaced) can store and retrieve an object', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand All @@ -63,7 +63,7 @@ test('(namespaced) can store and retrieve an object', async () => {
})

test('(namespaced) can store and delete an object', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand All @@ -88,7 +88,7 @@ test('(namespaced) can store and delete an object', async () => {
})

test('can clear the store', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand Down Expand Up @@ -134,7 +134,7 @@ test('can clear the store', async () => {
})

test('can clear empty store', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand All @@ -150,7 +150,7 @@ test('can clear empty store', async () => {
})

test('can set ttl expiry', async () => {
const azureTableAdapter = new AzureTable({
const azureTableAdapter = new AzureTableAdapter({
connectionString: localTestConnectionString,
tableName: 'test',
clientOptions: { allowInsecureConnection: true },
Expand Down

0 comments on commit edb82ad

Please sign in to comment.