Skip to content

Commit

Permalink
fix: separate ufuzzy import
Browse files Browse the repository at this point in the history
Moves the `createUFuzzyOperator` utility so that it’s no longer in the main bundle.  It can be imported thus:

```ts
import { createUFuzzyOperator } from ‘feathers-pinia/ufuzzy’
```
  • Loading branch information
marshallswain committed Apr 16, 2024
1 parent 71af645 commit 83a083f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"default": "./dist/feathers-pinia.js"
},
"require": "./dist/feathers-pinia.umd.cjs"
},
"./ufuzzy": {
"import": "./dist/ufuzzy.js",
"require": "./dist/ufuzzy.cjs"
}
},
"main": "./dist/feathers-pinia.umd.cjs",
Expand Down
1 change: 0 additions & 1 deletion src/custom-operators/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './sql-like.js'
export * from './fuzzy-search-with-ufuzzy.js'
1 change: 1 addition & 0 deletions src/ufuzzy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './custom-operators/fuzzy-search-with-ufuzzy.js'
3 changes: 2 additions & 1 deletion tests/fixtures/feathers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import auth from '@feathersjs/authentication-client'
import { computed, ref } from 'vue'
import { vi } from 'vitest'
import type { AdapterParams } from '@feathersjs/adapter-commons'
import { createPiniaClient, defineGetters, defineSetters, useInstanceDefaults, createUFuzzyOperator } from '../../src'
import { createPiniaClient, defineGetters, defineSetters, useInstanceDefaults } from '../../src'
import { createUFuzzyOperator } from '../../src/ufuzzy'
import { timeout } from '../test-utils.js'
import { makeContactsData } from './data.js'
import type { Comments } from './schemas/comments'
Expand Down

0 comments on commit 83a083f

Please sign in to comment.