Skip to content

Commit

Permalink
fix: SERVICE symbol sometimes cannot be imported
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallswain committed Apr 16, 2024
1 parent 8bbdfb5 commit 8754562
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/create-pinia-service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import type { Params as FeathersParams, FeathersService, Id, Paginated, PaginationOptions } from '@feathersjs/feathers'
import { SERVICE } from '@feathersjs/feathers'
import type { MaybeRef } from '@vueuse/core'
import type { ComputedRef } from 'vue-demi'
import { computed, isRef, reactive, ref, unref } from 'vue-demi'
import type { UseFindOptions, UseFindParams, UseGetParams } from './use-find-get/index.js'
import type { AnyData, Params, Query } from './types.js'
import { existingServiceMethods, getParams } from './utils/index.js'
import { SERVICE, existingServiceMethods, getParams } from './utils/index.js'
import { useFind, useGet } from './use-find-get/index.js'
import { convertData } from './utils/convert-data'
import type { ServiceInstance } from './modeling/index.js'
Expand Down
7 changes: 7 additions & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ import type { AnyData, AnyDataOrArray, DiffDefinition, Params, Query, QueryInfo
import { defineValues } from './define-properties.js'
import { convertData } from './convert-data.js'

// copied from @feathersjs/commons
export function createSymbol(name: string) {
return typeof Symbol !== 'undefined' ? Symbol.for(name) : name
}

export const SERVICE = createSymbol('@feathersjs/service')

interface GetExtendedQueryInfoOptions {
queryInfo: QueryInfo
service: any
Expand Down

0 comments on commit 8754562

Please sign in to comment.