Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(content-docs): export versioning utils #6477

Merged
merged 5 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "lib/index.js",
"exports": {
"./client": "./lib/client/index.js",
"./versions": "./lib/versions.js",
"./node": "./lib/node/index.js",
slorber marked this conversation as resolved.
Show resolved Hide resolved
".": "./lib/index.js"
},
"types": "src/plugin-content-docs.d.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/docusaurus-plugin-content-docs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,3 @@ export default async function pluginContentDocs(
}

export {validateOptions} from './options';
export * from './constants';
10 changes: 10 additions & 0 deletions packages/docusaurus-plugin-content-docs/src/node/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* 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.
*/

// APIs available to Node.js
export * from '../constants';
export * from '../versions';
Copy link
Collaborator

@slorber slorber Jan 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for constants I'm fine with * but I'd rather have named exports for everything else, so that we don't expose publicly things by mistake

(for client, all global data hooks are exposed on purpose)