Skip to content

Commit

Permalink
Fixed types declaration extractor from Volto core, re-enable it on re…
Browse files Browse the repository at this point in the history
…lease (#6534)
  • Loading branch information
sneridagh authored Dec 12, 2024
1 parent 4210165 commit 4dff6bd
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/volto/.release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"../scripts/prepublish.js": {}
},
"hooks": {
"before:bump": ["pnpm i18n"],
"before:bump": ["pnpm i18n", "pnpm build:types", "git add types"],
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}",
Expand Down
1 change: 1 addition & 0 deletions packages/volto/news/6534.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed and re-enabled the types declaration extractor from core Volto. @sneridagh
4 changes: 3 additions & 1 deletion packages/volto/tsconfig.declarations.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"preserveSymlinks": true,
"downlevelIteration": true,
"paths": {
"@plone/volto/*": ["./src/*"]
"@plone/volto/*": ["./src/*"],
"react": ["./node_modules/@types/react"],
"react-dom": ["./node_modules/@types/react-dom"]
}
},
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.tsx"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default ContentsDeleteModal;
declare function ContentsDeleteModal(props: any): import("react/jsx-runtime").JSX.Element;
declare namespace ContentsDeleteModal {
namespace propTypes {
let itemsToDelete: any;
let open: any;
let onOk: any;
let onCancel: any;
}
}
1 change: 1 addition & 0 deletions packages/volto/types/config/Blocks.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export function installDefaultBlocks(config: any): void;
export const groupBlocksOrder: {
id: string;
title: string;
Expand Down
1 change: 1 addition & 0 deletions packages/volto/types/config/Views.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export function installDefaultViews(config: any): any;
export namespace layoutViews {
export { DefaultView as document_view };
export { SummaryView as summary_view };
Expand Down
1 change: 1 addition & 0 deletions packages/volto/types/config/Widgets.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export function installDefaultWidgets(config: any): void;
export namespace widgetMapping {
export namespace id {
export { TokenWidget as subjects };
Expand Down
2 changes: 2 additions & 0 deletions packages/volto/types/reducers/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ declare namespace reducers {
export { form };
export { groups };
export { history };
export { linkIntegrity };
export { messages };
export { navigation };
export { querystring };
Expand Down Expand Up @@ -66,6 +67,7 @@ import emailSend from '@plone/volto/reducers/emailSend/emailSend';
import form from '@plone/volto/reducers/form/form';
import groups from '@plone/volto/reducers/groups/groups';
import history from '@plone/volto/reducers/history/history';
import linkIntegrity from '@plone/volto/reducers/linkIntegrity/linkIntegrity';
import messages from '@plone/volto/reducers/messages/messages';
import navigation from '@plone/volto/reducers/navigation/navigation';
import querystring from '@plone/volto/reducers/querystring/querystring';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* History reducer.
* @function linkIntegrity
* @param {Object} state Current state.
* @param {Object} action Action to be handled.
* @returns {Object} New state.
*/
export default function linkIntegrity(state?: any, action?: any): any;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};

0 comments on commit 4dff6bd

Please sign in to comment.