Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ module.exports = {
'jest/prefer-expect-resolves': WARNING,
'jest/prefer-lowercase-title': [WARNING, {ignore: ['describe']}],
'jest/prefer-spy-on': WARNING,
'jest/prefer-to-be': WARNING,
'jest/prefer-to-be': OFF,
'jest/prefer-to-have-length': WARNING,
'jest/require-top-level-describe': ERROR,
'jest/valid-title': [
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ jobs:
run: yarn build:website:fast

- name: TypeCheck website
# TODO temporary, remove TS skipLibCheck
# see https://github.com/facebook/docusaurus/pull/10486
run: yarn workspace website typecheck --project tsconfig.skipLibCheck.json
run: yarn workspace website typecheck
- name: TypeCheck website - min version - v5.1
run: |
yarn add typescript@5.1.6 --exact -D -W --ignore-scripts

# DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false)
jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json
yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts

yarn workspace website typecheck
- name: TypeCheck website - max version - Latest
# For latest TS there are often lib check errors, so we disable it
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ jobs:
run: yarn workspace website test:css-order

- name: TypeCheck website
# TODO temporary, remove TS skipLibCheck
# see https://github.com/facebook/docusaurus/pull/10486
run: yarn workspace website typecheck --project tsconfig.skipLibCheck.json
run: yarn workspace website typecheck
- name: TypeCheck website - min version - v5.1
run: |
yarn add typescript@5.1.6 --exact -D -W --ignore-scripts

# DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false)
jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json
yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts

yarn workspace website typecheck
- name: TypeCheck website - max version - Latest
# For latest TS there are often lib check errors, so we disable it
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,8 @@
"stylelint-config-standard": "^29.0.0",
"typescript": "~5.8.2"
},
"resolutions": {
"@docsearch/react": "^4.0.1"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 1 addition & 1 deletion packages/docusaurus-faster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "MIT",
"dependencies": {
"@docusaurus/types": "3.8.1",
"@rspack/core": "^1.4.0",
"@rspack/core": "^1.5.0",
"@swc/core": "^1.7.39",
"@swc/html": "^1.13.5",
"browserslist": "^4.24.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ See https://github.com/facebook/docusaurus/pull/9385

@media (min-width: 997px) {
.navbarSearchContainer {
padding: var(--ifm-navbar-item-padding-vertical)
var(--ifm-navbar-item-padding-horizontal);
padding: 0 var(--ifm-navbar-item-padding-horizontal);
}
}
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-search-algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@docusaurus/theme-translations": "3.8.1",
"@docusaurus/utils": "3.8.1",
"@docusaurus/utils-validation": "3.8.1",
"algoliasearch": "^5.17.1",
"algoliasearch-helper": "^3.22.6",
"algoliasearch": "^5.37.0",
"algoliasearch-helper": "^3.26.0",
"clsx": "^2.0.0",
"eta": "^2.2.0",
"fs-extra": "^11.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {mergeFacetFilters} from '../client/utils';

describe('mergeFacetFilters', () => {
it('merges [string,string]', () => {
expect(mergeFacetFilters('f1', 'f2')).toEqual(['f1', 'f2']);
});

it('merges [string,array]', () => {
// TODO this looks wrong to me, should be ['f1', ['f2', 'f3']] ?
expect(mergeFacetFilters('f1', ['f2', 'f3'])).toEqual(['f1', 'f2', 'f3']);
});

it('merges [string,undefined]', () => {
expect(mergeFacetFilters('f1', undefined)).toEqual('f1');
});

it('merges [undefined,string]', () => {
expect(mergeFacetFilters(undefined, 'f1')).toEqual('f1');
});

it('merges [array,undefined]', () => {
expect(mergeFacetFilters(['f1', 'f2'], undefined)).toEqual(['f1', 'f2']);
});

it('merges [undefined,array]', () => {
expect(mergeFacetFilters(undefined, ['f1', 'f2'])).toEqual(['f1', 'f2']);
});

it('merges [array,array]', () => {
expect(mergeFacetFilters(['f1'], ['f2'])).toEqual(['f1', 'f2']);

// TODO this looks wrong to me, should be [['f1', 'f2'], ['f3', 'f4']] ?
expect(mergeFacetFilters(['f1', 'f2'], ['f3', 'f4'])).toEqual([
'f1',
'f2',
'f3',
'f4',
]);
});
});
Loading
Loading