Skip to content

Commit

Permalink
chore: change flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Dec 15, 2022
1 parent 9a3c589 commit 9fbdbd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export interface ModuleOptions {
},
experimental: {
clientDB: boolean
noQueryParameters: boolean
stripQueryParameters: boolean
}
}

Expand Down Expand Up @@ -276,7 +276,7 @@ export default defineNuxtModule<ModuleOptions>({
documentDriven: false,
experimental: {
clientDB: false,
noQueryParameters: false
stripQueryParameters: false
}
},
async setup (options, nuxt) {
Expand Down Expand Up @@ -583,7 +583,7 @@ export default defineNuxtModule<ModuleOptions>({
defaultLocale: contentContext.defaultLocale,
integrity: buildIntegrity,
experimental: {
noQueryParameters: options.experimental.noQueryParameters,
stripQueryParameters: options.experimental.stripQueryParameters,
clientDB: options.experimental.clientDB && nuxt.options.ssr === false
},
api: {
Expand Down Expand Up @@ -690,7 +690,7 @@ export default defineNuxtModule<ModuleOptions>({

interface ModulePublicRuntimeConfig {
experimental: {
noQueryParameters: boolean
stripQueryParameters: boolean
clientDB: boolean
}

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/composables/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const fetchContentNavigation = async (queryBuilder?: QueryBuilder | Query
}
}

const apiPath = content.experimental.noQueryParameters
const apiPath = content.experimental.stripQueryParameters
? withContentBase(`/navigation/${process.dev ? '_' : `${hash(params)}.${content.integrity}`}/${encodeQueryParams(params)}.json`)
: withContentBase(process.dev ? `/navigation/${hash(params)}` : `/navigation/${hash(params)}.${content.integrity}.json`)

Expand All @@ -39,7 +39,7 @@ export const fetchContentNavigation = async (queryBuilder?: QueryBuilder | Query
const data = await $fetch<NavItem[]>(apiPath as any, {
method: 'GET',
responseType: 'json',
params: content.experimental.noQueryParameters
params: content.experimental.stripQueryParameters
? undefined
: {
_params: jsonStringify(params),
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/composables/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const createQueryFetch = <T = ParsedContent>(path?: string) => async (que

const params = query.params()

const apiPath = content.experimental.noQueryParameters
const apiPath = content.experimental.stripQueryParameters
? withContentBase(`/query/${process.dev ? '_' : `${hash(params)}.${content.integrity}`}/${encodeQueryParams(params)}.json`)
: withContentBase(process.dev ? '/query' : `/query/${hash(params)}.${content.integrity}.json`)

Expand All @@ -55,7 +55,7 @@ export const createQueryFetch = <T = ParsedContent>(path?: string) => async (que
const data = await $fetch(apiPath as any, {
method: 'GET',
responseType: 'json',
params: content.experimental.noQueryParameters
params: content.experimental.stripQueryParameters
? undefined
: {
_params: jsonStringify(params),
Expand Down

0 comments on commit 9fbdbd9

Please sign in to comment.