@savvy-web/silk-effects 9.6.0 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changesets/api/dependency-table.js +12 -12
- package/changesets/api/linter.js +23 -19
- package/changesets/api/transformer.js +38 -33
- package/changesets/categories/index.js +1 -1
- package/changesets/categories/types.js +2 -2
- package/changesets/changelog/getDependencyReleaseLine.js +1 -1
- package/changesets/changelog/index.js +2 -2
- package/changesets/constants.js +1 -1
- package/changesets/errors.js +1 -1
- package/changesets/index.js +11 -40
- package/changesets/markdownlint/rules/content-structure.js +2 -2
- package/changesets/markdownlint/rules/heading-hierarchy.js +2 -2
- package/changesets/markdownlint/rules/required-sections.js +2 -2
- package/changesets/markdownlint/rules/uncategorized-content.js +2 -2
- package/changesets/markdownlint/rules/utils.js +6 -6
- package/changesets/rules/content-structure.js +44 -0
- package/changesets/rules/dependency-table-format.js +54 -0
- package/changesets/rules/heading-hierarchy.js +37 -0
- package/changesets/rules/required-sections.js +34 -0
- package/changesets/rules/types.js +20 -0
- package/changesets/rules/uncategorized-content.js +30 -0
- package/changesets/schemas/changeset.js +1 -1
- package/changesets/transforms/aggregate-dependency-tables.js +96 -0
- package/changesets/transforms/contributor-footnotes.js +290 -0
- package/changesets/transforms/deduplicate-items.js +47 -0
- package/changesets/transforms/issue-link-refs.js +47 -0
- package/changesets/transforms/maintenance-note.js +65 -0
- package/changesets/transforms/merge-sections.js +56 -0
- package/changesets/transforms/normalize-format.js +53 -0
- package/changesets/transforms/reorder-sections.js +53 -0
- package/changesets/utils/blocks.js +67 -0
- package/changesets/utils/dependency-table.js +29 -36
- package/changesets/utils/markdown-emit.js +11 -36
- package/index.d.ts +54 -1199
- package/package.json +11 -18
- package/tsdoc-metadata.json +1 -1
- package/changesets/remark/plugins/aggregate-dependency-tables.js +0 -98
- package/changesets/remark/plugins/contributor-footnotes.js +0 -334
- package/changesets/remark/plugins/deduplicate-items.js +0 -31
- package/changesets/remark/plugins/issue-link-refs.js +0 -57
- package/changesets/remark/plugins/maintenance-note.js +0 -74
- package/changesets/remark/plugins/merge-sections.js +0 -42
- package/changesets/remark/plugins/normalize-format.js +0 -46
- package/changesets/remark/plugins/reorder-sections.js +0 -48
- package/changesets/remark/presets.js +0 -118
- package/changesets/remark/rules/content-structure.js +0 -21
- package/changesets/remark/rules/dependency-table-format.js +0 -37
- package/changesets/remark/rules/heading-hierarchy.js +0 -18
- package/changesets/remark/rules/required-sections.js +0 -16
- package/changesets/remark/rules/uncategorized-content.js +0 -30
- package/changesets/utils/remark-pipeline.js +0 -35
- package/changesets/utils/version-blocks.js +0 -107
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnalyzedWorkspace, BiomeSyncError, BiomeSyncError as BiomeSyncError$1, BiomeSyncOptions, BiomeSyncResult, BiomeSyncResult as BiomeSyncResult$1, ChangesetConfigError, ChangesetConfigError as ChangesetConfigError$1, ChangesetConfigFile, ChangesetConfigFile as ChangesetConfigFile$1, ConfigDiscoveryOptions, ConfigLocation, ConfigLocation as ConfigLocation$1, ConfigNotFoundError, ConfigSource, LIFECYCLE_SCRIPTS_CONFIG_KEY, PrBody, PublishTargetBindingError, PublishTargetBindingError as PublishTargetBindingError$1, ReleaseChannelError, ReleaseChannelError as ReleaseChannelError$1, SavvyBaseSection, SavvyHooksSection, SavvyInstallHook, SavvyInstallSection, SavvyOkfSection, SavvyToolchainSection, SilkChangesetConfigFile, SilkChangesetConfigFile as SilkChangesetConfigFile$1, SilkPublishConfig, WorkspaceAnalysis, WorkspaceAnalysis as WorkspaceAnalysis$1, WorkspaceAnalysisError, WorkspaceAnalysisError as WorkspaceAnalysisError$1, publishesBuiltLinkDirectory, savvyBasePreamble, savvyHooksHygiene, savvyInstallBlock, savvyInstallDeps, savvyOkfBlock, savvyOkfSync, savvyToolSection, savvyToolchainCheck } from "@savvy-web/silk-core";
|
|
2
2
|
import { Context, Data, Effect, FileSystem, Layer, Path, PlatformError, Schema } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import { Table } from "@effected/markdown";
|
|
4
4
|
import { ChildProcessSpawner } from "effect/process";
|
|
5
5
|
import { LockfileReader, PackageManagerDetector, PublishTarget, PublishabilityDetector, WorkspaceCatalogs, WorkspaceDiscovery, WorkspaceDiscoveryFailure, WorkspacePackage, WorkspaceSnapshotAtFailure, WorkspaceSnapshotWorktreeFailure, WorkspaceSnapshots, WorkspaceStateSnapshot, WorkspacesOptions } from "@effected/workspaces";
|
|
6
6
|
import { Git, GitCommandError, NotARepositoryError, UnknownRefError } from "@effected/git";
|
|
@@ -566,1034 +566,6 @@ declare class Changelog {
|
|
|
566
566
|
*/
|
|
567
567
|
static formatDependencyReleaseLine(changesets: NewChangesetWithCommit[], dependenciesUpdated: ModCompWithPackage[], options: Record<string, unknown> | null, logMode?: ChangesetLogModeValue): Promise<string>;
|
|
568
568
|
}
|
|
569
|
-
// ## Interfaces
|
|
570
|
-
/**
|
|
571
|
-
* Info associated with nodes by the ecosystem.
|
|
572
|
-
*
|
|
573
|
-
* This space is guaranteed to never be specified by unist or specifications
|
|
574
|
-
* implementing unist.
|
|
575
|
-
* But you can use it in utilities and plugins to store data.
|
|
576
|
-
*
|
|
577
|
-
* This type can be augmented to register custom data.
|
|
578
|
-
* For example:
|
|
579
|
-
*
|
|
580
|
-
* ```ts
|
|
581
|
-
* declare module 'unist' {
|
|
582
|
-
* interface Data {
|
|
583
|
-
* // `someNode.data.myId` is typed as `number | undefined`
|
|
584
|
-
* myId?: number | undefined
|
|
585
|
-
* }
|
|
586
|
-
* }
|
|
587
|
-
* ```
|
|
588
|
-
*/
|
|
589
|
-
interface Data$2 {}
|
|
590
|
-
/**
|
|
591
|
-
* One place in a source file.
|
|
592
|
-
*/
|
|
593
|
-
interface Point {
|
|
594
|
-
/**
|
|
595
|
-
* Line in a source file (1-indexed integer).
|
|
596
|
-
*/
|
|
597
|
-
line: number;
|
|
598
|
-
/**
|
|
599
|
-
* Column in a source file (1-indexed integer).
|
|
600
|
-
*/
|
|
601
|
-
column: number;
|
|
602
|
-
/**
|
|
603
|
-
* Character in a source file (0-indexed integer).
|
|
604
|
-
*/
|
|
605
|
-
offset?: number | undefined;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Position of a node in a source document.
|
|
609
|
-
*
|
|
610
|
-
* A position is a range between two points.
|
|
611
|
-
*/
|
|
612
|
-
interface Position {
|
|
613
|
-
/**
|
|
614
|
-
* Place of the first character of the parsed source region.
|
|
615
|
-
*/
|
|
616
|
-
start: Point;
|
|
617
|
-
/**
|
|
618
|
-
* Place of the first character after the parsed source region.
|
|
619
|
-
*/
|
|
620
|
-
end: Point;
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* Abstract unist node.
|
|
624
|
-
*
|
|
625
|
-
* The syntactic unit in unist syntax trees are called nodes.
|
|
626
|
-
*
|
|
627
|
-
* This interface is supposed to be extended.
|
|
628
|
-
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
629
|
-
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
|
630
|
-
* nor parent, but still a node.
|
|
631
|
-
*/
|
|
632
|
-
interface Node$1 {
|
|
633
|
-
/**
|
|
634
|
-
* Node type.
|
|
635
|
-
*/
|
|
636
|
-
type: string;
|
|
637
|
-
/**
|
|
638
|
-
* Info from the ecosystem.
|
|
639
|
-
*/
|
|
640
|
-
data?: Data$2 | undefined;
|
|
641
|
-
/**
|
|
642
|
-
* Position of a node in a source document.
|
|
643
|
-
*
|
|
644
|
-
* Nodes that are generated (not in the original source document) must not
|
|
645
|
-
* have a position.
|
|
646
|
-
*/
|
|
647
|
-
position?: Position | undefined;
|
|
648
|
-
}
|
|
649
|
-
// ## Enumeration
|
|
650
|
-
/**
|
|
651
|
-
* How phrasing content is aligned
|
|
652
|
-
* ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
|
|
653
|
-
*
|
|
654
|
-
* * `'left'`: See the
|
|
655
|
-
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
|
|
656
|
-
* value of the `text-align` CSS property
|
|
657
|
-
* * `'right'`: See the
|
|
658
|
-
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
|
|
659
|
-
* value of the `text-align` CSS property
|
|
660
|
-
* * `'center'`: See the
|
|
661
|
-
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
|
|
662
|
-
* value of the `text-align` CSS property
|
|
663
|
-
* * `null`: phrasing content is aligned as defined by the host environment
|
|
664
|
-
*
|
|
665
|
-
* Used in GFM tables.
|
|
666
|
-
*/
|
|
667
|
-
type AlignType = "center" | "left" | "right" | null;
|
|
668
|
-
/**
|
|
669
|
-
* Explicitness of a reference.
|
|
670
|
-
*
|
|
671
|
-
* `'shortcut'`: the reference is implicit, its identifier inferred from its
|
|
672
|
-
* content
|
|
673
|
-
* `'collapsed'`: the reference is explicit, its identifier inferred from its
|
|
674
|
-
* content
|
|
675
|
-
* `'full'`: the reference is explicit, its identifier explicitly set
|
|
676
|
-
*/
|
|
677
|
-
type ReferenceType = "shortcut" | "collapsed" | "full";
|
|
678
|
-
// ## Mixin
|
|
679
|
-
/**
|
|
680
|
-
* Node with a fallback.
|
|
681
|
-
*/
|
|
682
|
-
interface Alternative {
|
|
683
|
-
/**
|
|
684
|
-
* Equivalent content for environments that cannot represent the node as
|
|
685
|
-
* intended.
|
|
686
|
-
*/
|
|
687
|
-
alt?: string | null | undefined;
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* Internal relation from one node to another.
|
|
691
|
-
*
|
|
692
|
-
* Whether the value of `identifier` is expected to be a unique identifier or
|
|
693
|
-
* not depends on the type of node including the Association.
|
|
694
|
-
* An example of this is that they should be unique on {@link Definition},
|
|
695
|
-
* whereas multiple {@link LinkReference}s can be non-unique to be associated
|
|
696
|
-
* with one definition.
|
|
697
|
-
*/
|
|
698
|
-
interface Association {
|
|
699
|
-
/**
|
|
700
|
-
* Relation of association.
|
|
701
|
-
*
|
|
702
|
-
* `identifier` is a source value: character escapes and character
|
|
703
|
-
* references are not parsed.
|
|
704
|
-
*
|
|
705
|
-
* It can match another node.
|
|
706
|
-
*
|
|
707
|
-
* Its value must be normalized.
|
|
708
|
-
* To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
|
|
709
|
-
* trim the optional initial and/or final space, and perform Unicode-aware
|
|
710
|
-
* case-folding.
|
|
711
|
-
*/
|
|
712
|
-
identifier: string;
|
|
713
|
-
/**
|
|
714
|
-
* Relation of association, in parsed form.
|
|
715
|
-
*
|
|
716
|
-
* `label` is a `string` value: it works just like `title` on {@link Link}
|
|
717
|
-
* or a `lang` on {@link Code}: character escapes and character references
|
|
718
|
-
* are parsed.
|
|
719
|
-
*
|
|
720
|
-
* It can match another node.
|
|
721
|
-
*/
|
|
722
|
-
label?: string | null | undefined;
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Marker that is associated to another node.
|
|
726
|
-
*/
|
|
727
|
-
interface Reference extends Association {
|
|
728
|
-
/**
|
|
729
|
-
* Explicitness of the reference.
|
|
730
|
-
*/
|
|
731
|
-
referenceType: ReferenceType;
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Reference to resource.
|
|
735
|
-
*/
|
|
736
|
-
interface Resource {
|
|
737
|
-
/**
|
|
738
|
-
* URL to the referenced resource.
|
|
739
|
-
*/
|
|
740
|
-
url: string;
|
|
741
|
-
/**
|
|
742
|
-
* Advisory information for the resource, such as would be appropriate for
|
|
743
|
-
* a tooltip.
|
|
744
|
-
*/
|
|
745
|
-
title?: string | null | undefined;
|
|
746
|
-
}
|
|
747
|
-
// ## Interfaces
|
|
748
|
-
/**
|
|
749
|
-
* Info associated with mdast nodes by the ecosystem.
|
|
750
|
-
*
|
|
751
|
-
* This space is guaranteed to never be specified by unist or mdast.
|
|
752
|
-
* But you can use it in utilities and plugins to store data.
|
|
753
|
-
*
|
|
754
|
-
* This type can be augmented to register custom data.
|
|
755
|
-
* For example:
|
|
756
|
-
*
|
|
757
|
-
* ```ts
|
|
758
|
-
* declare module 'mdast' {
|
|
759
|
-
* interface Data {
|
|
760
|
-
* // `someNode.data.myId` is typed as `number | undefined`
|
|
761
|
-
* myId?: number | undefined
|
|
762
|
-
* }
|
|
763
|
-
* }
|
|
764
|
-
* ```
|
|
765
|
-
*/
|
|
766
|
-
interface Data$1 extends Data$2 {}
|
|
767
|
-
// ## Content maps
|
|
768
|
-
/**
|
|
769
|
-
* Union of registered mdast nodes that can occur where block content is
|
|
770
|
-
* expected.
|
|
771
|
-
*
|
|
772
|
-
* To register custom mdast nodes, add them to {@link BlockContentMap}.
|
|
773
|
-
* They will be automatically added here.
|
|
774
|
-
*/
|
|
775
|
-
type BlockContent = BlockContentMap[keyof BlockContentMap];
|
|
776
|
-
/**
|
|
777
|
-
* Registry of all mdast nodes that can occur where {@link BlockContent} is
|
|
778
|
-
* expected.
|
|
779
|
-
*
|
|
780
|
-
* This interface can be augmented to register custom node types:
|
|
781
|
-
*
|
|
782
|
-
* ```ts
|
|
783
|
-
* declare module 'mdast' {
|
|
784
|
-
* interface BlockContentMap {
|
|
785
|
-
* // Allow using MDX ESM nodes defined by `remark-mdx`.
|
|
786
|
-
* mdxjsEsm: MdxjsEsm;
|
|
787
|
-
* }
|
|
788
|
-
* }
|
|
789
|
-
* ```
|
|
790
|
-
*
|
|
791
|
-
* For a union of all block content, see {@link RootContent}.
|
|
792
|
-
*/
|
|
793
|
-
interface BlockContentMap {
|
|
794
|
-
blockquote: Blockquote;
|
|
795
|
-
code: Code;
|
|
796
|
-
heading: Heading;
|
|
797
|
-
html: Html;
|
|
798
|
-
list: List;
|
|
799
|
-
paragraph: Paragraph;
|
|
800
|
-
table: Table;
|
|
801
|
-
thematicBreak: ThematicBreak;
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Union of registered mdast nodes that can occur where definition content is
|
|
805
|
-
* expected.
|
|
806
|
-
*
|
|
807
|
-
* To register custom mdast nodes, add them to {@link DefinitionContentMap}.
|
|
808
|
-
* They will be automatically added here.
|
|
809
|
-
*/
|
|
810
|
-
type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
|
|
811
|
-
/**
|
|
812
|
-
* Registry of all mdast nodes that can occur where {@link DefinitionContent}
|
|
813
|
-
* is expected.
|
|
814
|
-
*
|
|
815
|
-
* This interface can be augmented to register custom node types:
|
|
816
|
-
*
|
|
817
|
-
* ```ts
|
|
818
|
-
* declare module 'mdast' {
|
|
819
|
-
* interface DefinitionContentMap {
|
|
820
|
-
* custom: Custom;
|
|
821
|
-
* }
|
|
822
|
-
* }
|
|
823
|
-
* ```
|
|
824
|
-
*
|
|
825
|
-
* For a union of all definition content, see {@link RootContent}.
|
|
826
|
-
*/
|
|
827
|
-
interface DefinitionContentMap {
|
|
828
|
-
definition: Definition;
|
|
829
|
-
footnoteDefinition: FootnoteDefinition;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Union of registered mdast nodes that can occur where list content is
|
|
833
|
-
* expected.
|
|
834
|
-
*
|
|
835
|
-
* To register custom mdast nodes, add them to {@link ListContentMap}.
|
|
836
|
-
* They will be automatically added here.
|
|
837
|
-
*/
|
|
838
|
-
type ListContent = ListContentMap[keyof ListContentMap];
|
|
839
|
-
/**
|
|
840
|
-
* Registry of all mdast nodes that can occur where {@link ListContent}
|
|
841
|
-
* is expected.
|
|
842
|
-
*
|
|
843
|
-
* This interface can be augmented to register custom node types:
|
|
844
|
-
*
|
|
845
|
-
* ```ts
|
|
846
|
-
* declare module 'mdast' {
|
|
847
|
-
* interface ListContentMap {
|
|
848
|
-
* custom: Custom;
|
|
849
|
-
* }
|
|
850
|
-
* }
|
|
851
|
-
* ```
|
|
852
|
-
*
|
|
853
|
-
* For a union of all list content, see {@link RootContent}.
|
|
854
|
-
*/
|
|
855
|
-
interface ListContentMap {
|
|
856
|
-
listItem: ListItem;
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* Union of registered mdast nodes that can occur where phrasing content is
|
|
860
|
-
* expected.
|
|
861
|
-
*
|
|
862
|
-
* To register custom mdast nodes, add them to {@link PhrasingContentMap}.
|
|
863
|
-
* They will be automatically added here.
|
|
864
|
-
*/
|
|
865
|
-
type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
|
|
866
|
-
/**
|
|
867
|
-
* Registry of all mdast nodes that can occur where {@link PhrasingContent}
|
|
868
|
-
* is expected.
|
|
869
|
-
*
|
|
870
|
-
* This interface can be augmented to register custom node types:
|
|
871
|
-
*
|
|
872
|
-
* ```ts
|
|
873
|
-
* declare module 'mdast' {
|
|
874
|
-
* interface PhrasingContentMap {
|
|
875
|
-
* // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
|
|
876
|
-
* mdxJsxTextElement: MDXJSXTextElement;
|
|
877
|
-
* }
|
|
878
|
-
* }
|
|
879
|
-
* ```
|
|
880
|
-
*
|
|
881
|
-
* For a union of all phrasing content, see {@link RootContent}.
|
|
882
|
-
*/
|
|
883
|
-
interface PhrasingContentMap {
|
|
884
|
-
break: Break;
|
|
885
|
-
delete: Delete;
|
|
886
|
-
emphasis: Emphasis;
|
|
887
|
-
footnoteReference: FootnoteReference;
|
|
888
|
-
html: Html;
|
|
889
|
-
image: Image;
|
|
890
|
-
imageReference: ImageReference;
|
|
891
|
-
inlineCode: InlineCode;
|
|
892
|
-
link: Link;
|
|
893
|
-
linkReference: LinkReference;
|
|
894
|
-
strong: Strong;
|
|
895
|
-
text: Text;
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* Union of registered mdast nodes that can occur in {@link Root}.
|
|
899
|
-
*
|
|
900
|
-
* To register custom mdast nodes, add them to {@link RootContentMap}.
|
|
901
|
-
* They will be automatically added here.
|
|
902
|
-
*/
|
|
903
|
-
type RootContent = RootContentMap[keyof RootContentMap];
|
|
904
|
-
/**
|
|
905
|
-
* Registry of all mdast nodes that can occur as children of {@link Root}.
|
|
906
|
-
*
|
|
907
|
-
* > **Note**: {@link Root} does not need to be an entire document.
|
|
908
|
-
* > it can also be a fragment.
|
|
909
|
-
*
|
|
910
|
-
* This interface can be augmented to register custom node types:
|
|
911
|
-
*
|
|
912
|
-
* ```ts
|
|
913
|
-
* declare module 'mdast' {
|
|
914
|
-
* interface RootContentMap {
|
|
915
|
-
* // Allow using toml nodes defined by `remark-frontmatter`.
|
|
916
|
-
* toml: TOML;
|
|
917
|
-
* }
|
|
918
|
-
* }
|
|
919
|
-
* ```
|
|
920
|
-
*
|
|
921
|
-
* For a union of all {@link Root} children, see {@link RootContent}.
|
|
922
|
-
*/
|
|
923
|
-
interface RootContentMap {
|
|
924
|
-
blockquote: Blockquote;
|
|
925
|
-
break: Break;
|
|
926
|
-
code: Code;
|
|
927
|
-
definition: Definition;
|
|
928
|
-
delete: Delete;
|
|
929
|
-
emphasis: Emphasis;
|
|
930
|
-
footnoteDefinition: FootnoteDefinition;
|
|
931
|
-
footnoteReference: FootnoteReference;
|
|
932
|
-
heading: Heading;
|
|
933
|
-
html: Html;
|
|
934
|
-
image: Image;
|
|
935
|
-
imageReference: ImageReference;
|
|
936
|
-
inlineCode: InlineCode;
|
|
937
|
-
link: Link;
|
|
938
|
-
linkReference: LinkReference;
|
|
939
|
-
list: List;
|
|
940
|
-
listItem: ListItem;
|
|
941
|
-
paragraph: Paragraph;
|
|
942
|
-
strong: Strong;
|
|
943
|
-
table: Table;
|
|
944
|
-
tableCell: TableCell;
|
|
945
|
-
tableRow: TableRow;
|
|
946
|
-
text: Text;
|
|
947
|
-
thematicBreak: ThematicBreak;
|
|
948
|
-
yaml: Yaml$1;
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* Union of registered mdast nodes that can occur where row content is
|
|
952
|
-
* expected.
|
|
953
|
-
*
|
|
954
|
-
* To register custom mdast nodes, add them to {@link RowContentMap}.
|
|
955
|
-
* They will be automatically added here.
|
|
956
|
-
*/
|
|
957
|
-
type RowContent = RowContentMap[keyof RowContentMap];
|
|
958
|
-
/**
|
|
959
|
-
* Registry of all mdast nodes that can occur where {@link RowContent}
|
|
960
|
-
* is expected.
|
|
961
|
-
*
|
|
962
|
-
* This interface can be augmented to register custom node types:
|
|
963
|
-
*
|
|
964
|
-
* ```ts
|
|
965
|
-
* declare module 'mdast' {
|
|
966
|
-
* interface RowContentMap {
|
|
967
|
-
* custom: Custom;
|
|
968
|
-
* }
|
|
969
|
-
* }
|
|
970
|
-
* ```
|
|
971
|
-
*
|
|
972
|
-
* For a union of all row content, see {@link RootContent}.
|
|
973
|
-
*/
|
|
974
|
-
interface RowContentMap {
|
|
975
|
-
tableCell: TableCell;
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* Union of registered mdast nodes that can occur where table content is
|
|
979
|
-
* expected.
|
|
980
|
-
*
|
|
981
|
-
* To register custom mdast nodes, add them to {@link TableContentMap}.
|
|
982
|
-
* They will be automatically added here.
|
|
983
|
-
*/
|
|
984
|
-
type TableContent = TableContentMap[keyof TableContentMap];
|
|
985
|
-
/**
|
|
986
|
-
* Registry of all mdast nodes that can occur where {@link TableContent}
|
|
987
|
-
* is expected.
|
|
988
|
-
*
|
|
989
|
-
* This interface can be augmented to register custom node types:
|
|
990
|
-
*
|
|
991
|
-
* ```ts
|
|
992
|
-
* declare module 'mdast' {
|
|
993
|
-
* interface TableContentMap {
|
|
994
|
-
* custom: Custom;
|
|
995
|
-
* }
|
|
996
|
-
* }
|
|
997
|
-
* ```
|
|
998
|
-
*
|
|
999
|
-
* For a union of all table content, see {@link RootContent}.
|
|
1000
|
-
*/
|
|
1001
|
-
interface TableContentMap {
|
|
1002
|
-
tableRow: TableRow;
|
|
1003
|
-
}
|
|
1004
|
-
// ## Abstract nodes
|
|
1005
|
-
/**
|
|
1006
|
-
* Abstract mdast node that contains the smallest possible value.
|
|
1007
|
-
*
|
|
1008
|
-
* This interface is supposed to be extended if you make custom mdast nodes.
|
|
1009
|
-
*
|
|
1010
|
-
* For a union of all registered mdast literals, see {@link Literals}.
|
|
1011
|
-
*/
|
|
1012
|
-
interface Literal extends Node {
|
|
1013
|
-
/**
|
|
1014
|
-
* Plain-text value.
|
|
1015
|
-
*/
|
|
1016
|
-
value: string;
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
* Abstract mdast node.
|
|
1020
|
-
*
|
|
1021
|
-
* This interface is supposed to be extended.
|
|
1022
|
-
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
1023
|
-
* But for example in markdown, a thematic break (`***`) is neither literal nor
|
|
1024
|
-
* parent, but still a node.
|
|
1025
|
-
*
|
|
1026
|
-
* To register custom mdast nodes, add them to {@link RootContentMap} and other
|
|
1027
|
-
* places where relevant (such as {@link ElementContentMap}).
|
|
1028
|
-
*
|
|
1029
|
-
* For a union of all registered mdast nodes, see {@link Nodes}.
|
|
1030
|
-
*/
|
|
1031
|
-
interface Node extends Node$1 {
|
|
1032
|
-
/**
|
|
1033
|
-
* Info from the ecosystem.
|
|
1034
|
-
*/
|
|
1035
|
-
data?: Data$1 | undefined;
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
* Abstract mdast node that contains other mdast nodes (*children*).
|
|
1039
|
-
*
|
|
1040
|
-
* This interface is supposed to be extended if you make custom mdast nodes.
|
|
1041
|
-
*
|
|
1042
|
-
* For a union of all registered mdast parents, see {@link Parents}.
|
|
1043
|
-
*/
|
|
1044
|
-
interface Parent extends Node {
|
|
1045
|
-
/**
|
|
1046
|
-
* List of children.
|
|
1047
|
-
*/
|
|
1048
|
-
children: RootContent[];
|
|
1049
|
-
}
|
|
1050
|
-
// ## Concrete nodes
|
|
1051
|
-
/**
|
|
1052
|
-
* Markdown block quote.
|
|
1053
|
-
*/
|
|
1054
|
-
interface Blockquote extends Parent {
|
|
1055
|
-
/**
|
|
1056
|
-
* Node type of mdast block quote.
|
|
1057
|
-
*/
|
|
1058
|
-
type: "blockquote";
|
|
1059
|
-
/**
|
|
1060
|
-
* Children of block quote.
|
|
1061
|
-
*/
|
|
1062
|
-
children: Array<BlockContent | DefinitionContent>;
|
|
1063
|
-
/**
|
|
1064
|
-
* Data associated with the mdast block quote.
|
|
1065
|
-
*/
|
|
1066
|
-
data?: BlockquoteData | undefined;
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* Info associated with mdast block quote nodes by the ecosystem.
|
|
1070
|
-
*/
|
|
1071
|
-
interface BlockquoteData extends Data$1 {}
|
|
1072
|
-
/**
|
|
1073
|
-
* Markdown break.
|
|
1074
|
-
*/
|
|
1075
|
-
interface Break extends Node {
|
|
1076
|
-
/**
|
|
1077
|
-
* Node type of mdast break.
|
|
1078
|
-
*/
|
|
1079
|
-
type: "break";
|
|
1080
|
-
/**
|
|
1081
|
-
* Data associated with the mdast break.
|
|
1082
|
-
*/
|
|
1083
|
-
data?: BreakData | undefined;
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
* Info associated with mdast break nodes by the ecosystem.
|
|
1087
|
-
*/
|
|
1088
|
-
interface BreakData extends Data$1 {}
|
|
1089
|
-
/**
|
|
1090
|
-
* Markdown code (flow) (block).
|
|
1091
|
-
*/
|
|
1092
|
-
interface Code extends Literal {
|
|
1093
|
-
/**
|
|
1094
|
-
* Node type of mdast code (flow).
|
|
1095
|
-
*/
|
|
1096
|
-
type: "code";
|
|
1097
|
-
/**
|
|
1098
|
-
* Language of computer code being marked up.
|
|
1099
|
-
*/
|
|
1100
|
-
lang?: string | null | undefined;
|
|
1101
|
-
/**
|
|
1102
|
-
* Custom information relating to the node.
|
|
1103
|
-
*
|
|
1104
|
-
* If the lang field is present, a meta field can be present.
|
|
1105
|
-
*/
|
|
1106
|
-
meta?: string | null | undefined;
|
|
1107
|
-
/**
|
|
1108
|
-
* Data associated with the mdast code (flow).
|
|
1109
|
-
*/
|
|
1110
|
-
data?: CodeData | undefined;
|
|
1111
|
-
}
|
|
1112
|
-
/**
|
|
1113
|
-
* Info associated with mdast code (flow) (block) nodes by the ecosystem.
|
|
1114
|
-
*/
|
|
1115
|
-
interface CodeData extends Data$1 {}
|
|
1116
|
-
/**
|
|
1117
|
-
* Markdown definition.
|
|
1118
|
-
*/
|
|
1119
|
-
interface Definition extends Node, Association, Resource {
|
|
1120
|
-
/**
|
|
1121
|
-
* Node type of mdast definition.
|
|
1122
|
-
*/
|
|
1123
|
-
type: "definition";
|
|
1124
|
-
/**
|
|
1125
|
-
* Data associated with the mdast definition.
|
|
1126
|
-
*/
|
|
1127
|
-
data?: DefinitionData | undefined;
|
|
1128
|
-
}
|
|
1129
|
-
/**
|
|
1130
|
-
* Info associated with mdast definition nodes by the ecosystem.
|
|
1131
|
-
*/
|
|
1132
|
-
interface DefinitionData extends Data$1 {}
|
|
1133
|
-
/**
|
|
1134
|
-
* Markdown GFM delete (strikethrough).
|
|
1135
|
-
*/
|
|
1136
|
-
interface Delete extends Parent {
|
|
1137
|
-
/**
|
|
1138
|
-
* Node type of mdast GFM delete.
|
|
1139
|
-
*/
|
|
1140
|
-
type: "delete";
|
|
1141
|
-
/**
|
|
1142
|
-
* Children of GFM delete.
|
|
1143
|
-
*/
|
|
1144
|
-
children: PhrasingContent[];
|
|
1145
|
-
/**
|
|
1146
|
-
* Data associated with the mdast GFM delete.
|
|
1147
|
-
*/
|
|
1148
|
-
data?: DeleteData | undefined;
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* Info associated with mdast GFM delete nodes by the ecosystem.
|
|
1152
|
-
*/
|
|
1153
|
-
interface DeleteData extends Data$1 {}
|
|
1154
|
-
/**
|
|
1155
|
-
* Markdown emphasis.
|
|
1156
|
-
*/
|
|
1157
|
-
interface Emphasis extends Parent {
|
|
1158
|
-
/**
|
|
1159
|
-
* Node type of mdast emphasis.
|
|
1160
|
-
*/
|
|
1161
|
-
type: "emphasis";
|
|
1162
|
-
/**
|
|
1163
|
-
* Children of emphasis.
|
|
1164
|
-
*/
|
|
1165
|
-
children: PhrasingContent[];
|
|
1166
|
-
/**
|
|
1167
|
-
* Data associated with the mdast emphasis.
|
|
1168
|
-
*/
|
|
1169
|
-
data?: EmphasisData | undefined;
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* Info associated with mdast emphasis nodes by the ecosystem.
|
|
1173
|
-
*/
|
|
1174
|
-
interface EmphasisData extends Data$1 {}
|
|
1175
|
-
/**
|
|
1176
|
-
* Markdown GFM footnote definition.
|
|
1177
|
-
*/
|
|
1178
|
-
interface FootnoteDefinition extends Parent, Association {
|
|
1179
|
-
/**
|
|
1180
|
-
* Node type of mdast GFM footnote definition.
|
|
1181
|
-
*/
|
|
1182
|
-
type: "footnoteDefinition";
|
|
1183
|
-
/**
|
|
1184
|
-
* Children of GFM footnote definition.
|
|
1185
|
-
*/
|
|
1186
|
-
children: Array<BlockContent | DefinitionContent>;
|
|
1187
|
-
/**
|
|
1188
|
-
* Data associated with the mdast GFM footnote definition.
|
|
1189
|
-
*/
|
|
1190
|
-
data?: FootnoteDefinitionData | undefined;
|
|
1191
|
-
}
|
|
1192
|
-
/**
|
|
1193
|
-
* Info associated with mdast GFM footnote definition nodes by the ecosystem.
|
|
1194
|
-
*/
|
|
1195
|
-
interface FootnoteDefinitionData extends Data$1 {}
|
|
1196
|
-
/**
|
|
1197
|
-
* Markdown GFM footnote reference.
|
|
1198
|
-
*/
|
|
1199
|
-
interface FootnoteReference extends Association, Node {
|
|
1200
|
-
/**
|
|
1201
|
-
* Node type of mdast GFM footnote reference.
|
|
1202
|
-
*/
|
|
1203
|
-
type: "footnoteReference";
|
|
1204
|
-
/**
|
|
1205
|
-
* Data associated with the mdast GFM footnote reference.
|
|
1206
|
-
*/
|
|
1207
|
-
data?: FootnoteReferenceData | undefined;
|
|
1208
|
-
}
|
|
1209
|
-
/**
|
|
1210
|
-
* Info associated with mdast GFM footnote reference nodes by the ecosystem.
|
|
1211
|
-
*/
|
|
1212
|
-
interface FootnoteReferenceData extends Data$1 {}
|
|
1213
|
-
/**
|
|
1214
|
-
* Markdown heading.
|
|
1215
|
-
*/
|
|
1216
|
-
interface Heading extends Parent {
|
|
1217
|
-
/**
|
|
1218
|
-
* Node type of mdast heading.
|
|
1219
|
-
*/
|
|
1220
|
-
type: "heading";
|
|
1221
|
-
/**
|
|
1222
|
-
* Heading rank.
|
|
1223
|
-
*
|
|
1224
|
-
* A value of `1` is said to be the highest rank and `6` the lowest.
|
|
1225
|
-
*/
|
|
1226
|
-
depth: 1 | 2 | 3 | 4 | 5 | 6;
|
|
1227
|
-
/**
|
|
1228
|
-
* Children of heading.
|
|
1229
|
-
*/
|
|
1230
|
-
children: PhrasingContent[];
|
|
1231
|
-
/**
|
|
1232
|
-
* Data associated with the mdast heading.
|
|
1233
|
-
*/
|
|
1234
|
-
data?: HeadingData | undefined;
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* Info associated with mdast heading nodes by the ecosystem.
|
|
1238
|
-
*/
|
|
1239
|
-
interface HeadingData extends Data$1 {}
|
|
1240
|
-
/**
|
|
1241
|
-
* Markdown HTML.
|
|
1242
|
-
*/
|
|
1243
|
-
interface Html extends Literal {
|
|
1244
|
-
/**
|
|
1245
|
-
* Node type of mdast HTML.
|
|
1246
|
-
*/
|
|
1247
|
-
type: "html";
|
|
1248
|
-
/**
|
|
1249
|
-
* Data associated with the mdast HTML.
|
|
1250
|
-
*/
|
|
1251
|
-
data?: HtmlData | undefined;
|
|
1252
|
-
}
|
|
1253
|
-
/**
|
|
1254
|
-
* Info associated with mdast HTML nodes by the ecosystem.
|
|
1255
|
-
*/
|
|
1256
|
-
interface HtmlData extends Data$1 {}
|
|
1257
|
-
/**
|
|
1258
|
-
* Markdown image.
|
|
1259
|
-
*/
|
|
1260
|
-
interface Image extends Alternative, Node, Resource {
|
|
1261
|
-
/**
|
|
1262
|
-
* Node type of mdast image.
|
|
1263
|
-
*/
|
|
1264
|
-
type: "image";
|
|
1265
|
-
/**
|
|
1266
|
-
* Data associated with the mdast image.
|
|
1267
|
-
*/
|
|
1268
|
-
data?: ImageData | undefined;
|
|
1269
|
-
}
|
|
1270
|
-
/**
|
|
1271
|
-
* Info associated with mdast image nodes by the ecosystem.
|
|
1272
|
-
*/
|
|
1273
|
-
interface ImageData extends Data$1 {}
|
|
1274
|
-
/**
|
|
1275
|
-
* Markdown image reference.
|
|
1276
|
-
*/
|
|
1277
|
-
interface ImageReference extends Alternative, Node, Reference {
|
|
1278
|
-
/**
|
|
1279
|
-
* Node type of mdast image reference.
|
|
1280
|
-
*/
|
|
1281
|
-
type: "imageReference";
|
|
1282
|
-
/**
|
|
1283
|
-
* Data associated with the mdast image reference.
|
|
1284
|
-
*/
|
|
1285
|
-
data?: ImageReferenceData | undefined;
|
|
1286
|
-
}
|
|
1287
|
-
/**
|
|
1288
|
-
* Info associated with mdast image reference nodes by the ecosystem.
|
|
1289
|
-
*/
|
|
1290
|
-
interface ImageReferenceData extends Data$1 {}
|
|
1291
|
-
/**
|
|
1292
|
-
* Markdown code (text) (inline).
|
|
1293
|
-
*/
|
|
1294
|
-
interface InlineCode extends Literal {
|
|
1295
|
-
/**
|
|
1296
|
-
* Node type of mdast code (text).
|
|
1297
|
-
*/
|
|
1298
|
-
type: "inlineCode";
|
|
1299
|
-
/**
|
|
1300
|
-
* Data associated with the mdast code (text).
|
|
1301
|
-
*/
|
|
1302
|
-
data?: InlineCodeData | undefined;
|
|
1303
|
-
}
|
|
1304
|
-
/**
|
|
1305
|
-
* Info associated with mdast code (text) (inline) nodes by the ecosystem.
|
|
1306
|
-
*/
|
|
1307
|
-
interface InlineCodeData extends Data$1 {}
|
|
1308
|
-
/**
|
|
1309
|
-
* Markdown link.
|
|
1310
|
-
*/
|
|
1311
|
-
interface Link extends Parent, Resource {
|
|
1312
|
-
/**
|
|
1313
|
-
* Node type of mdast link.
|
|
1314
|
-
*/
|
|
1315
|
-
type: "link";
|
|
1316
|
-
/**
|
|
1317
|
-
* Children of link.
|
|
1318
|
-
*/
|
|
1319
|
-
children: PhrasingContent[];
|
|
1320
|
-
/**
|
|
1321
|
-
* Data associated with the mdast link.
|
|
1322
|
-
*/
|
|
1323
|
-
data?: LinkData | undefined;
|
|
1324
|
-
}
|
|
1325
|
-
/**
|
|
1326
|
-
* Info associated with mdast link nodes by the ecosystem.
|
|
1327
|
-
*/
|
|
1328
|
-
interface LinkData extends Data$1 {}
|
|
1329
|
-
/**
|
|
1330
|
-
* Markdown link reference.
|
|
1331
|
-
*/
|
|
1332
|
-
interface LinkReference extends Parent, Reference {
|
|
1333
|
-
/**
|
|
1334
|
-
* Node type of mdast link reference.
|
|
1335
|
-
*/
|
|
1336
|
-
type: "linkReference";
|
|
1337
|
-
/**
|
|
1338
|
-
* Children of link reference.
|
|
1339
|
-
*/
|
|
1340
|
-
children: PhrasingContent[];
|
|
1341
|
-
/**
|
|
1342
|
-
* Data associated with the mdast link reference.
|
|
1343
|
-
*/
|
|
1344
|
-
data?: LinkReferenceData | undefined;
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
* Info associated with mdast link reference nodes by the ecosystem.
|
|
1348
|
-
*/
|
|
1349
|
-
interface LinkReferenceData extends Data$1 {}
|
|
1350
|
-
/**
|
|
1351
|
-
* Markdown list.
|
|
1352
|
-
*/
|
|
1353
|
-
interface List extends Parent {
|
|
1354
|
-
/**
|
|
1355
|
-
* Node type of mdast list.
|
|
1356
|
-
*/
|
|
1357
|
-
type: "list";
|
|
1358
|
-
/**
|
|
1359
|
-
* Whether the items have been intentionally ordered (when `true`), or that
|
|
1360
|
-
* the order of items is not important (when `false` or not present).
|
|
1361
|
-
*/
|
|
1362
|
-
ordered?: boolean | null | undefined;
|
|
1363
|
-
/**
|
|
1364
|
-
* The starting number of the list, when the `ordered` field is `true`.
|
|
1365
|
-
*/
|
|
1366
|
-
start?: number | null | undefined;
|
|
1367
|
-
/**
|
|
1368
|
-
* Whether one or more of the children are separated with a blank line from
|
|
1369
|
-
* its siblings (when `true`), or not (when `false` or not present).
|
|
1370
|
-
*/
|
|
1371
|
-
spread?: boolean | null | undefined;
|
|
1372
|
-
/**
|
|
1373
|
-
* Children of list.
|
|
1374
|
-
*/
|
|
1375
|
-
children: ListContent[];
|
|
1376
|
-
/**
|
|
1377
|
-
* Data associated with the mdast list.
|
|
1378
|
-
*/
|
|
1379
|
-
data?: ListData | undefined;
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Info associated with mdast list nodes by the ecosystem.
|
|
1383
|
-
*/
|
|
1384
|
-
interface ListData extends Data$1 {}
|
|
1385
|
-
/**
|
|
1386
|
-
* Markdown list item.
|
|
1387
|
-
*/
|
|
1388
|
-
interface ListItem extends Parent {
|
|
1389
|
-
/**
|
|
1390
|
-
* Node type of mdast list item.
|
|
1391
|
-
*/
|
|
1392
|
-
type: "listItem";
|
|
1393
|
-
/**
|
|
1394
|
-
* Whether the item is a tasklist item (when `boolean`).
|
|
1395
|
-
*
|
|
1396
|
-
* When `true`, the item is complete.
|
|
1397
|
-
* When `false`, the item is incomplete.
|
|
1398
|
-
*/
|
|
1399
|
-
checked?: boolean | null | undefined;
|
|
1400
|
-
/**
|
|
1401
|
-
* Whether one or more of the children are separated with a blank line from
|
|
1402
|
-
* its siblings (when `true`), or not (when `false` or not present).
|
|
1403
|
-
*/
|
|
1404
|
-
spread?: boolean | null | undefined;
|
|
1405
|
-
/**
|
|
1406
|
-
* Children of list item.
|
|
1407
|
-
*/
|
|
1408
|
-
children: Array<BlockContent | DefinitionContent>;
|
|
1409
|
-
/**
|
|
1410
|
-
* Data associated with the mdast list item.
|
|
1411
|
-
*/
|
|
1412
|
-
data?: ListItemData | undefined;
|
|
1413
|
-
}
|
|
1414
|
-
/**
|
|
1415
|
-
* Info associated with mdast list item nodes by the ecosystem.
|
|
1416
|
-
*/
|
|
1417
|
-
interface ListItemData extends Data$1 {}
|
|
1418
|
-
/**
|
|
1419
|
-
* Markdown paragraph.
|
|
1420
|
-
*/
|
|
1421
|
-
interface Paragraph extends Parent {
|
|
1422
|
-
/**
|
|
1423
|
-
* Node type of mdast paragraph.
|
|
1424
|
-
*/
|
|
1425
|
-
type: "paragraph";
|
|
1426
|
-
/**
|
|
1427
|
-
* Children of paragraph.
|
|
1428
|
-
*/
|
|
1429
|
-
children: PhrasingContent[];
|
|
1430
|
-
/**
|
|
1431
|
-
* Data associated with the mdast paragraph.
|
|
1432
|
-
*/
|
|
1433
|
-
data?: ParagraphData | undefined;
|
|
1434
|
-
}
|
|
1435
|
-
/**
|
|
1436
|
-
* Info associated with mdast paragraph nodes by the ecosystem.
|
|
1437
|
-
*/
|
|
1438
|
-
interface ParagraphData extends Data$1 {}
|
|
1439
|
-
/**
|
|
1440
|
-
* Document fragment or a whole document.
|
|
1441
|
-
*
|
|
1442
|
-
* Should be used as the root of a tree and must not be used as a child.
|
|
1443
|
-
*/
|
|
1444
|
-
interface Root extends Parent {
|
|
1445
|
-
/**
|
|
1446
|
-
* Node type of mdast root.
|
|
1447
|
-
*/
|
|
1448
|
-
type: "root";
|
|
1449
|
-
/**
|
|
1450
|
-
* Data associated with the mdast root.
|
|
1451
|
-
*/
|
|
1452
|
-
data?: RootData | undefined;
|
|
1453
|
-
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Info associated with mdast root nodes by the ecosystem.
|
|
1456
|
-
*/
|
|
1457
|
-
interface RootData extends Data$1 {}
|
|
1458
|
-
/**
|
|
1459
|
-
* Markdown strong.
|
|
1460
|
-
*/
|
|
1461
|
-
interface Strong extends Parent {
|
|
1462
|
-
/**
|
|
1463
|
-
* Node type of mdast strong.
|
|
1464
|
-
*/
|
|
1465
|
-
type: "strong";
|
|
1466
|
-
/**
|
|
1467
|
-
* Children of strong.
|
|
1468
|
-
*/
|
|
1469
|
-
children: PhrasingContent[];
|
|
1470
|
-
/**
|
|
1471
|
-
* Data associated with the mdast strong.
|
|
1472
|
-
*/
|
|
1473
|
-
data?: StrongData | undefined;
|
|
1474
|
-
}
|
|
1475
|
-
/**
|
|
1476
|
-
* Info associated with mdast strong nodes by the ecosystem.
|
|
1477
|
-
*/
|
|
1478
|
-
interface StrongData extends Data$1 {}
|
|
1479
|
-
/**
|
|
1480
|
-
* Markdown GFM table.
|
|
1481
|
-
*/
|
|
1482
|
-
interface Table extends Parent {
|
|
1483
|
-
/**
|
|
1484
|
-
* Node type of mdast GFM table.
|
|
1485
|
-
*/
|
|
1486
|
-
type: "table";
|
|
1487
|
-
/**
|
|
1488
|
-
* How cells in columns are aligned.
|
|
1489
|
-
*/
|
|
1490
|
-
align?: AlignType[] | null | undefined;
|
|
1491
|
-
/**
|
|
1492
|
-
* Children of GFM table.
|
|
1493
|
-
*/
|
|
1494
|
-
children: TableContent[];
|
|
1495
|
-
/**
|
|
1496
|
-
* Data associated with the mdast GFM table.
|
|
1497
|
-
*/
|
|
1498
|
-
data?: TableData | undefined;
|
|
1499
|
-
}
|
|
1500
|
-
/**
|
|
1501
|
-
* Info associated with mdast GFM table nodes by the ecosystem.
|
|
1502
|
-
*/
|
|
1503
|
-
interface TableData extends Data$1 {}
|
|
1504
|
-
/**
|
|
1505
|
-
* Markdown GFM table row.
|
|
1506
|
-
*/
|
|
1507
|
-
interface TableRow extends Parent {
|
|
1508
|
-
/**
|
|
1509
|
-
* Node type of mdast GFM table row.
|
|
1510
|
-
*/
|
|
1511
|
-
type: "tableRow";
|
|
1512
|
-
/**
|
|
1513
|
-
* Children of GFM table row.
|
|
1514
|
-
*/
|
|
1515
|
-
children: RowContent[];
|
|
1516
|
-
/**
|
|
1517
|
-
* Data associated with the mdast GFM table row.
|
|
1518
|
-
*/
|
|
1519
|
-
data?: TableRowData | undefined;
|
|
1520
|
-
}
|
|
1521
|
-
/**
|
|
1522
|
-
* Info associated with mdast GFM table row nodes by the ecosystem.
|
|
1523
|
-
*/
|
|
1524
|
-
interface TableRowData extends Data$1 {}
|
|
1525
|
-
/**
|
|
1526
|
-
* Markdown GFM table cell.
|
|
1527
|
-
*/
|
|
1528
|
-
interface TableCell extends Parent {
|
|
1529
|
-
/**
|
|
1530
|
-
* Node type of mdast GFM table cell.
|
|
1531
|
-
*/
|
|
1532
|
-
type: "tableCell";
|
|
1533
|
-
/**
|
|
1534
|
-
* Children of GFM table cell.
|
|
1535
|
-
*/
|
|
1536
|
-
children: PhrasingContent[];
|
|
1537
|
-
/**
|
|
1538
|
-
* Data associated with the mdast GFM table cell.
|
|
1539
|
-
*/
|
|
1540
|
-
data?: TableCellData | undefined;
|
|
1541
|
-
}
|
|
1542
|
-
/**
|
|
1543
|
-
* Info associated with mdast GFM table cell nodes by the ecosystem.
|
|
1544
|
-
*/
|
|
1545
|
-
interface TableCellData extends Data$1 {}
|
|
1546
|
-
/**
|
|
1547
|
-
* Markdown text.
|
|
1548
|
-
*/
|
|
1549
|
-
interface Text extends Literal {
|
|
1550
|
-
/**
|
|
1551
|
-
* Node type of mdast text.
|
|
1552
|
-
*/
|
|
1553
|
-
type: "text";
|
|
1554
|
-
/**
|
|
1555
|
-
* Data associated with the mdast text.
|
|
1556
|
-
*/
|
|
1557
|
-
data?: TextData | undefined;
|
|
1558
|
-
}
|
|
1559
|
-
/**
|
|
1560
|
-
* Info associated with mdast text nodes by the ecosystem.
|
|
1561
|
-
*/
|
|
1562
|
-
interface TextData extends Data$1 {}
|
|
1563
|
-
/**
|
|
1564
|
-
* Markdown thematic break (horizontal rule).
|
|
1565
|
-
*/
|
|
1566
|
-
interface ThematicBreak extends Node {
|
|
1567
|
-
/**
|
|
1568
|
-
* Node type of mdast thematic break.
|
|
1569
|
-
*/
|
|
1570
|
-
type: "thematicBreak";
|
|
1571
|
-
/**
|
|
1572
|
-
* Data associated with the mdast thematic break.
|
|
1573
|
-
*/
|
|
1574
|
-
data?: ThematicBreakData | undefined;
|
|
1575
|
-
}
|
|
1576
|
-
/**
|
|
1577
|
-
* Info associated with mdast thematic break nodes by the ecosystem.
|
|
1578
|
-
*/
|
|
1579
|
-
interface ThematicBreakData extends Data$1 {}
|
|
1580
|
-
/**
|
|
1581
|
-
* Markdown YAML.
|
|
1582
|
-
*/
|
|
1583
|
-
interface Yaml$1 extends Literal {
|
|
1584
|
-
/**
|
|
1585
|
-
* Node type of mdast YAML.
|
|
1586
|
-
*/
|
|
1587
|
-
type: "yaml";
|
|
1588
|
-
/**
|
|
1589
|
-
* Data associated with the mdast YAML.
|
|
1590
|
-
*/
|
|
1591
|
-
data?: YamlData | undefined;
|
|
1592
|
-
}
|
|
1593
|
-
/**
|
|
1594
|
-
* Info associated with mdast YAML nodes by the ecosystem.
|
|
1595
|
-
*/
|
|
1596
|
-
interface YamlData extends Data$1 {}
|
|
1597
569
|
/**
|
|
1598
570
|
* Valid dependency table actions.
|
|
1599
571
|
*
|
|
@@ -1819,10 +791,10 @@ declare const DependencyTableSchema: Schema.$Array<Schema.Struct<{
|
|
|
1819
791
|
* @remarks
|
|
1820
792
|
* The typical workflow for processing dependency tables is:
|
|
1821
793
|
*
|
|
1822
|
-
* 1. **Parse** an
|
|
794
|
+
* 1. **Parse** an `@effected/markdown` `Table` node into typed {@link DependencyTableRow} objects
|
|
1823
795
|
* 2. **Collapse** duplicate rows (same package updated multiple times) into single entries
|
|
1824
796
|
* 3. **Sort** rows by dependency type, then alphabetically by package name
|
|
1825
|
-
* 4. **Serialize** back to an
|
|
797
|
+
* 4. **Serialize** back to an `@effected/markdown` `Table` node or directly to a markdown string
|
|
1826
798
|
*
|
|
1827
799
|
* The {@link DependencyTable.aggregate} method combines the collapse and sort
|
|
1828
800
|
* steps into a single call, which is the most common usage pattern.
|
|
@@ -1835,9 +807,9 @@ declare const DependencyTableSchema: Schema.$Array<Schema.Struct<{
|
|
|
1835
807
|
* ```typescript
|
|
1836
808
|
* import { DependencyTable } from "\@savvy-web/changesets";
|
|
1837
809
|
* import type { DependencyTableRow } from "\@savvy-web/changesets";
|
|
1838
|
-
* import type { Table } from "
|
|
810
|
+
* import type { Table } from "\@effected/markdown";
|
|
1839
811
|
*
|
|
1840
|
-
* // Given an
|
|
812
|
+
* // Given an \@effected/markdown Table node from a parsed CHANGELOG
|
|
1841
813
|
* declare const tableNode: Table;
|
|
1842
814
|
*
|
|
1843
815
|
* // Parse into typed rows
|
|
@@ -1846,7 +818,7 @@ declare const DependencyTableSchema: Schema.$Array<Schema.Struct<{
|
|
|
1846
818
|
* // Collapse duplicates and sort by type, then name
|
|
1847
819
|
* const aggregated: DependencyTableRow[] = DependencyTable.aggregate(rows);
|
|
1848
820
|
*
|
|
1849
|
-
* // Serialize back to an
|
|
821
|
+
* // Serialize back to an \@effected/markdown Table node for further AST manipulation
|
|
1850
822
|
* const outputNode: Table = DependencyTable.serialize(aggregated);
|
|
1851
823
|
*
|
|
1852
824
|
* // Or serialize directly to a markdown string
|
|
@@ -1876,7 +848,7 @@ declare const DependencyTableSchema: Schema.$Array<Schema.Struct<{
|
|
|
1876
848
|
declare class DependencyTable {
|
|
1877
849
|
private constructor();
|
|
1878
850
|
/**
|
|
1879
|
-
* Parse an
|
|
851
|
+
* Parse an `@effected/markdown` `Table` node into typed dependency table rows.
|
|
1880
852
|
*
|
|
1881
853
|
* @remarks
|
|
1882
854
|
* Extracts the text content from each table cell and maps it to the
|
|
@@ -1884,21 +856,21 @@ declare class DependencyTable {
|
|
|
1884
856
|
* treated as the header and skipped. Rows that do not have the expected
|
|
1885
857
|
* number of columns are ignored.
|
|
1886
858
|
*
|
|
1887
|
-
* @param tableNode - An
|
|
859
|
+
* @param tableNode - An `@effected/markdown` `Table` node from a parsed markdown tree
|
|
1888
860
|
* @returns Array of {@link DependencyTableRow} objects, one per data row
|
|
1889
861
|
*/
|
|
1890
862
|
static parse(tableNode: Table): DependencyTableRow[];
|
|
1891
863
|
/**
|
|
1892
|
-
* Serialize typed dependency table rows into an
|
|
864
|
+
* Serialize typed dependency table rows into an `@effected/markdown` `Table` node.
|
|
1893
865
|
*
|
|
1894
866
|
* @remarks
|
|
1895
|
-
* Produces a well-formed
|
|
867
|
+
* Produces a well-formed `@effected/markdown` `Table` with a header row
|
|
1896
868
|
* (`Dependency | Type | Action | From | To`) followed by one data row
|
|
1897
|
-
* per input entry. The resulting node can be inserted into a
|
|
869
|
+
* per input entry. The resulting node can be inserted into a kit tree
|
|
1898
870
|
* for further processing or stringification.
|
|
1899
871
|
*
|
|
1900
872
|
* @param rows - Array of {@link DependencyTableRow} objects to serialize
|
|
1901
|
-
* @returns An
|
|
873
|
+
* @returns An `@effected/markdown` `Table` node ready for tree insertion
|
|
1902
874
|
*/
|
|
1903
875
|
static serialize(rows: DependencyTableRow[]): Table;
|
|
1904
876
|
/**
|
|
@@ -1906,7 +878,7 @@ declare class DependencyTable {
|
|
|
1906
878
|
*
|
|
1907
879
|
* @remarks
|
|
1908
880
|
* Convenience method that combines {@link DependencyTable.serialize} with
|
|
1909
|
-
*
|
|
881
|
+
* the canonical `@effected/markdown` emitter. Produces a GFM-compatible markdown table string.
|
|
1910
882
|
*
|
|
1911
883
|
* @param rows - Array of {@link DependencyTableRow} objects to render
|
|
1912
884
|
* @returns A markdown string containing the formatted table
|
|
@@ -1955,7 +927,7 @@ declare class DependencyTable {
|
|
|
1955
927
|
/**
|
|
1956
928
|
* Class-based API wrapper for changeset linting.
|
|
1957
929
|
*
|
|
1958
|
-
* Provides a static class interface that runs all five
|
|
930
|
+
* Provides a static class interface that runs all five kit-node lint rules
|
|
1959
931
|
* against changeset markdown files and returns structured diagnostics.
|
|
1960
932
|
*
|
|
1961
933
|
* @internal
|
|
@@ -1964,7 +936,7 @@ declare class DependencyTable {
|
|
|
1964
936
|
* A single lint diagnostic message produced by changeset validation.
|
|
1965
937
|
*
|
|
1966
938
|
* @remarks
|
|
1967
|
-
* Each `LintMessage` corresponds to one
|
|
939
|
+
* Each `LintMessage` corresponds to one lint rule violation found
|
|
1968
940
|
* during changeset validation. Messages include source location information
|
|
1969
941
|
* (file, line, column) for integration with editors, CI reporters, and
|
|
1970
942
|
* the Effect CLI's `lint` and `check` commands.
|
|
@@ -1990,13 +962,13 @@ interface LintMessage {
|
|
|
1990
962
|
*/
|
|
1991
963
|
file: string;
|
|
1992
964
|
/**
|
|
1993
|
-
* Identifier of the
|
|
965
|
+
* Identifier of the lint rule that produced this message.
|
|
1994
966
|
*
|
|
1995
967
|
* @remarks
|
|
1996
|
-
* Corresponds to one of the five built-in rules:
|
|
1997
|
-
* `"
|
|
1998
|
-
*
|
|
1999
|
-
*
|
|
968
|
+
* Corresponds to one of the five built-in rules:
|
|
969
|
+
* `"changeset-heading-hierarchy"`, `"changeset-required-sections"`,
|
|
970
|
+
* `"changeset-content-structure"`, `"changeset-dependency-table-format"`,
|
|
971
|
+
* or `"changeset-uncategorized-content"`.
|
|
2000
972
|
*/
|
|
2001
973
|
rule: string;
|
|
2002
974
|
/**
|
|
@@ -2004,16 +976,14 @@ interface LintMessage {
|
|
|
2004
976
|
*
|
|
2005
977
|
* @remarks
|
|
2006
978
|
* Line numbers are relative to the content after YAML frontmatter
|
|
2007
|
-
* stripping
|
|
2008
|
-
* position information.
|
|
979
|
+
* stripping (the blank line after the closing `---` counts as line 1).
|
|
2009
980
|
*/
|
|
2010
981
|
line: number;
|
|
2011
982
|
/**
|
|
2012
983
|
* Column number where the issue was detected (1-based).
|
|
2013
984
|
*
|
|
2014
985
|
* @remarks
|
|
2015
|
-
*
|
|
2016
|
-
* information.
|
|
986
|
+
* Taken from the start position of the offending node.
|
|
2017
987
|
*/
|
|
2018
988
|
column: number;
|
|
2019
989
|
/**
|
|
@@ -2029,7 +999,7 @@ interface LintMessage {
|
|
|
2029
999
|
/**
|
|
2030
1000
|
* Static class for linting changeset markdown files.
|
|
2031
1001
|
*
|
|
2032
|
-
* Runs the five
|
|
1002
|
+
* Runs the five `@effected/markdown` kit-node lint rules (heading-hierarchy, required-sections,
|
|
2033
1003
|
* content-structure, dependency-table-format, uncategorized-content) against
|
|
2034
1004
|
* changeset markdown and returns structured {@link LintMessage} diagnostics.
|
|
2035
1005
|
*
|
|
@@ -2218,7 +1188,7 @@ type MaintenanceReason = typeof MaintenanceReasonSchema.Type;
|
|
|
2218
1188
|
*/
|
|
2219
1189
|
declare function deriveMaintenanceReason(release: ComprehensiveRelease, plan: ReleasePlan, config: Config): MaintenanceReason | undefined;
|
|
2220
1190
|
/**
|
|
2221
|
-
* Options for
|
|
1191
|
+
* Options for `maintenanceNote`.
|
|
2222
1192
|
*
|
|
2223
1193
|
* @public
|
|
2224
1194
|
*/
|
|
@@ -2228,7 +1198,6 @@ interface MaintenanceNoteOptions {
|
|
|
2228
1198
|
/** Why the package released with no changesets of its own. */
|
|
2229
1199
|
readonly reason: MaintenanceReason;
|
|
2230
1200
|
}
|
|
2231
|
-
declare const MaintenanceNotePlugin: Plugin<[MaintenanceNoteOptions], Root>;
|
|
2232
1201
|
/**
|
|
2233
1202
|
* Optional per-file behavior for {@link ChangelogTransformer}.
|
|
2234
1203
|
*
|
|
@@ -2248,15 +1217,15 @@ interface TransformOptions {
|
|
|
2248
1217
|
/**
|
|
2249
1218
|
* Static class for post-processing CHANGELOG.md files.
|
|
2250
1219
|
*
|
|
2251
|
-
* Implements the third layer of the three-layer pipeline by running
|
|
2252
|
-
*
|
|
2253
|
-
*
|
|
2254
|
-
*
|
|
1220
|
+
* Implements the third layer of the three-layer pipeline by running seven
|
|
1221
|
+
* `@effected/markdown` kit-node transforms in a fixed order to clean up,
|
|
1222
|
+
* normalize, and enhance changelog output produced by the formatter layer:
|
|
1223
|
+
* aggregate dependency tables, merge duplicate sections, reorder sections by
|
|
1224
|
+
* category priority, deduplicate list items, aggregate contributor thanks,
|
|
1225
|
+
* convert issue references to reference links, and normalize formatting. An
|
|
1226
|
+
* optional maintenance-note transform runs last.
|
|
2255
1227
|
*
|
|
2256
1228
|
* @remarks
|
|
2257
|
-
* See {@link SilkChangesetTransformPreset} for the ordered plugin list and
|
|
2258
|
-
* the rationale behind each plugin's position.
|
|
2259
|
-
*
|
|
2260
1229
|
* The transformer operates on the full CHANGELOG.md content (all versions),
|
|
2261
1230
|
* not just the latest release block. It is idempotent -- running it multiple
|
|
2262
1231
|
* times produces the same output.
|
|
@@ -2305,7 +1274,7 @@ interface TransformOptions {
|
|
|
2305
1274
|
* }
|
|
2306
1275
|
* ```
|
|
2307
1276
|
*
|
|
2308
|
-
* @see {@link Categories} for the priority order used
|
|
1277
|
+
* @see {@link Categories} for the priority order used when reordering sections
|
|
2309
1278
|
* @see {@link ChangesetLinter} for the pre-validation layer (layer 1)
|
|
2310
1279
|
* @see {@link Changelog} for the formatter layer (layer 2)
|
|
2311
1280
|
*
|
|
@@ -2314,15 +1283,14 @@ interface TransformOptions {
|
|
|
2314
1283
|
declare class ChangelogTransformer {
|
|
2315
1284
|
private constructor();
|
|
2316
1285
|
/**
|
|
2317
|
-
* Transform CHANGELOG markdown content by running the
|
|
2318
|
-
*
|
|
1286
|
+
* Transform CHANGELOG markdown content by running the kit-node
|
|
1287
|
+
* changelog transforms.
|
|
2319
1288
|
*
|
|
2320
1289
|
* @remarks
|
|
2321
|
-
* The input is parsed
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2325
|
-
* idempotent.
|
|
1290
|
+
* The input is parsed into `@effected/markdown` nodes (GFM dialect, author
|
|
1291
|
+
* spellings canonicalized), folded through every transform in order, and
|
|
1292
|
+
* emitted back to markdown through the canonical `@effected/markdown`
|
|
1293
|
+
* stringifier. The operation is synchronous and idempotent.
|
|
2326
1294
|
*
|
|
2327
1295
|
* @param content - Raw CHANGELOG markdown string (may contain multiple
|
|
2328
1296
|
* version blocks, GFM tables, footnotes, and reference links)
|
|
@@ -2335,7 +1303,7 @@ declare class ChangelogTransformer {
|
|
|
2335
1303
|
* Transform a CHANGELOG file in-place.
|
|
2336
1304
|
*
|
|
2337
1305
|
* @remarks
|
|
2338
|
-
* Reads the file synchronously, runs all
|
|
1306
|
+
* Reads the file synchronously, runs all transforms via
|
|
2339
1307
|
* {@link ChangelogTransformer.transformContent}, and writes the result
|
|
2340
1308
|
* back to the same path. The file is overwritten atomically (single
|
|
2341
1309
|
* `writeFileSync` call).
|
|
@@ -2563,7 +1531,7 @@ declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(a
|
|
|
2563
1531
|
* Markdown parsing failure.
|
|
2564
1532
|
*
|
|
2565
1533
|
* @remarks
|
|
2566
|
-
* Raised when a markdown file cannot be parsed into an AST by the
|
|
1534
|
+
* Raised when a markdown file cannot be parsed into an AST by the @effected/markdown
|
|
2567
1535
|
* pipeline. Carries optional source file location information (line, column)
|
|
2568
1536
|
* for diagnostic display.
|
|
2569
1537
|
*
|
|
@@ -5630,7 +4598,7 @@ type Rule$1 = Rule$2;
|
|
|
5630
4598
|
* `content` token before the next prefix or end of list.
|
|
5631
4599
|
*
|
|
5632
4600
|
* @remarks
|
|
5633
|
-
* This rule mirrors the
|
|
4601
|
+
* This rule mirrors the kit rule `contentStructure` in `src/changesets/rules/content-structure.ts` but uses
|
|
5634
4602
|
* markdownlint's micromark token API so it can run inside markdownlint-cli2 and
|
|
5635
4603
|
* the VS Code markdownlint extension.
|
|
5636
4604
|
*
|
|
@@ -5642,17 +4610,17 @@ type Rule$1 = Rule$2;
|
|
|
5642
4610
|
* ```
|
|
5643
4611
|
*
|
|
5644
4612
|
* @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH003.md | CSH003 rule documentation}
|
|
5645
|
-
* @see `src/
|
|
4613
|
+
* @see `src/changesets/rules/content-structure.ts` for the corresponding kit-node rule
|
|
5646
4614
|
*
|
|
5647
4615
|
* @public
|
|
5648
4616
|
*/
|
|
5649
|
-
declare const ContentStructureRule
|
|
4617
|
+
declare const ContentStructureRule: Rule$1;
|
|
5650
4618
|
/**
|
|
5651
4619
|
* The markdownlint `Rule` object for CSH005 (`changeset-dependency-table-format`).
|
|
5652
4620
|
*
|
|
5653
4621
|
* @public
|
|
5654
4622
|
*/
|
|
5655
|
-
declare const DependencyTableFormatRule
|
|
4623
|
+
declare const DependencyTableFormatRule: Rule$1;
|
|
5656
4624
|
/**
|
|
5657
4625
|
* markdownlint rule: `changeset-heading-hierarchy` (CSH001).
|
|
5658
4626
|
*
|
|
@@ -5666,7 +4634,7 @@ declare const DependencyTableFormatRule$1: Rule$1;
|
|
|
5666
4634
|
* (h2 then h3, not h2 then h4).
|
|
5667
4635
|
*
|
|
5668
4636
|
* @remarks
|
|
5669
|
-
* This rule mirrors the
|
|
4637
|
+
* This rule mirrors the kit rule `headingHierarchy` in `src/changesets/rules/heading-hierarchy.ts` but uses
|
|
5670
4638
|
* markdownlint's micromark token API so it can run inside markdownlint-cli2 and
|
|
5671
4639
|
* the VS Code markdownlint extension.
|
|
5672
4640
|
*
|
|
@@ -5678,11 +4646,11 @@ declare const DependencyTableFormatRule$1: Rule$1;
|
|
|
5678
4646
|
* ```
|
|
5679
4647
|
*
|
|
5680
4648
|
* @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH001.md | CSH001 rule documentation}
|
|
5681
|
-
* @see `src/
|
|
4649
|
+
* @see `src/changesets/rules/heading-hierarchy.ts` for the corresponding kit-node rule
|
|
5682
4650
|
*
|
|
5683
4651
|
* @public
|
|
5684
4652
|
*/
|
|
5685
|
-
declare const HeadingHierarchyRule
|
|
4653
|
+
declare const HeadingHierarchyRule: Rule$1;
|
|
5686
4654
|
/**
|
|
5687
4655
|
* markdownlint rule: `changeset-required-sections` (CSH002).
|
|
5688
4656
|
*
|
|
@@ -5696,7 +4664,7 @@ declare const HeadingHierarchyRule$1: Rule$1;
|
|
|
5696
4664
|
* (`src/categories/index.ts`). This rule inspects `atxHeading` micromark
|
|
5697
4665
|
* tokens and extracts their text via the {@link getHeadingText} utility.
|
|
5698
4666
|
*
|
|
5699
|
-
* This rule mirrors the
|
|
4667
|
+
* This rule mirrors the kit rule `requiredSections` in `src/changesets/rules/required-sections.ts` but uses
|
|
5700
4668
|
* markdownlint's micromark token API so it can run inside markdownlint-cli2 and
|
|
5701
4669
|
* the VS Code markdownlint extension.
|
|
5702
4670
|
*
|
|
@@ -5708,11 +4676,11 @@ declare const HeadingHierarchyRule$1: Rule$1;
|
|
|
5708
4676
|
* ```
|
|
5709
4677
|
*
|
|
5710
4678
|
* @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH002.md | CSH002 rule documentation}
|
|
5711
|
-
* @see `src/
|
|
4679
|
+
* @see `src/changesets/rules/required-sections.ts` for the corresponding kit-node rule
|
|
5712
4680
|
*
|
|
5713
4681
|
* @public
|
|
5714
4682
|
*/
|
|
5715
|
-
declare const RequiredSectionsRule
|
|
4683
|
+
declare const RequiredSectionsRule: Rule$1;
|
|
5716
4684
|
/**
|
|
5717
4685
|
* markdownlint rule: `changeset-uncategorized-content` (CSH004).
|
|
5718
4686
|
*
|
|
@@ -5727,7 +4695,7 @@ declare const RequiredSectionsRule$1: Rule$1;
|
|
|
5727
4695
|
* triggers an error. This ensures that changeset content is always grouped
|
|
5728
4696
|
* under a recognized category heading.
|
|
5729
4697
|
*
|
|
5730
|
-
* This rule mirrors the
|
|
4698
|
+
* This rule mirrors the kit rule `uncategorizedContent` in `src/changesets/rules/uncategorized-content.ts` but
|
|
5731
4699
|
* uses markdownlint's micromark token API so it can run inside
|
|
5732
4700
|
* markdownlint-cli2 and the VS Code markdownlint extension.
|
|
5733
4701
|
*
|
|
@@ -5739,11 +4707,11 @@ declare const RequiredSectionsRule$1: Rule$1;
|
|
|
5739
4707
|
* ```
|
|
5740
4708
|
*
|
|
5741
4709
|
* @see {@link https://github.com/savvy-web/systems/blob/main/packages/silk-effects/docs/rules/CSH004.md | CSH004 rule documentation}
|
|
5742
|
-
* @see `src/
|
|
4710
|
+
* @see `src/changesets/rules/uncategorized-content.ts` for the corresponding kit-node rule
|
|
5743
4711
|
*
|
|
5744
4712
|
* @public
|
|
5745
4713
|
*/
|
|
5746
|
-
declare const UncategorizedContentRule
|
|
4714
|
+
declare const UncategorizedContentRule: Rule$1;
|
|
5747
4715
|
/**
|
|
5748
4716
|
* All changeset rules as an array for markdownlint-cli2 `customRules` config.
|
|
5749
4717
|
*
|
|
@@ -5757,121 +4725,8 @@ declare const UncategorizedContentRule$1: Rule$1;
|
|
|
5757
4725
|
* @public
|
|
5758
4726
|
*/
|
|
5759
4727
|
declare const SilkChangesetsRules: Rule$1[];
|
|
5760
|
-
declare const AggregateDependencyTablesPlugin: Plugin<[], Root>;
|
|
5761
|
-
/**
|
|
5762
|
-
* Options for {@link ContributorFootnotesPlugin}.
|
|
5763
|
-
*
|
|
5764
|
-
* @public
|
|
5765
|
-
*/
|
|
5766
|
-
interface ContributorFootnotesOptions {
|
|
5767
|
-
/**
|
|
5768
|
-
* Whether to emit the aggregated `### Thanks` section. Defaults to
|
|
5769
|
-
* `true`. When `false`, inline attributions and any existing Thanks
|
|
5770
|
-
* section are stripped and nothing is emitted.
|
|
5771
|
-
*/
|
|
5772
|
-
readonly thanks?: boolean;
|
|
5773
|
-
}
|
|
5774
|
-
declare const ContributorFootnotesPlugin: Plugin<[ContributorFootnotesOptions?], Root>;
|
|
5775
|
-
declare const DeduplicateItemsPlugin: Plugin<[], Root>;
|
|
5776
|
-
declare const IssueLinkRefsPlugin: Plugin<[], Root>;
|
|
5777
|
-
declare const MergeSectionsPlugin: Plugin<[], Root>;
|
|
5778
|
-
declare const NormalizeFormatPlugin: Plugin<[], Root>;
|
|
5779
|
-
declare const ReorderSectionsPlugin: Plugin<[], Root>;
|
|
5780
|
-
/**
|
|
5781
|
-
* Remark preset collections for changeset lint rules and transform plugins.
|
|
5782
|
-
*
|
|
5783
|
-
* @remarks
|
|
5784
|
-
* Presets bundle related remark plugins into ordered arrays for convenient
|
|
5785
|
-
* consumption. Each preset is a `readonly` tuple so that TypeScript can
|
|
5786
|
-
* narrow element types. Iterate and `.use()` each entry with `unified()`.
|
|
5787
|
-
*
|
|
5788
|
-
* @see {@link SilkChangesetPreset} for lint rules
|
|
5789
|
-
* @see {@link SilkChangesetTransformPreset} for transform plugins
|
|
5790
|
-
*/
|
|
5791
|
-
/**
|
|
5792
|
-
* Preset combining all changeset lint rules for convenient consumption.
|
|
5793
|
-
*
|
|
5794
|
-
* @remarks
|
|
5795
|
-
* Includes the following rules in order:
|
|
5796
|
-
*
|
|
5797
|
-
* 1. {@link HeadingHierarchyRule} (CSH001) -- no h1, no depth skips
|
|
5798
|
-
* 2. {@link RequiredSectionsRule} (CSH002) -- h2 headings must match a known category
|
|
5799
|
-
* 3. {@link ContentStructureRule} (CSH003) -- non-empty sections, code fence languages, non-empty list items
|
|
5800
|
-
* 4. {@link UncategorizedContentRule} (CSH004) -- no content before the first h2 heading
|
|
5801
|
-
* 5. {@link DependencyTableFormatRule} (CSH005) -- dependency table column/value validation
|
|
5802
|
-
*
|
|
5803
|
-
* Rule execution order is not significant for lint rules; all rules run
|
|
5804
|
-
* independently over the same AST and report warnings to the virtual file.
|
|
5805
|
-
*
|
|
5806
|
-
* @example
|
|
5807
|
-
* ```typescript
|
|
5808
|
-
* import { SilkChangesetPreset } from "\@savvy-web/changesets/remark";
|
|
5809
|
-
* import remarkParse from "remark-parse";
|
|
5810
|
-
* import { unified } from "unified";
|
|
5811
|
-
* import { read } from "to-vfile";
|
|
5812
|
-
*
|
|
5813
|
-
* const processor = unified().use(remarkParse);
|
|
5814
|
-
* for (const rule of SilkChangesetPreset) {
|
|
5815
|
-
* processor.use(rule);
|
|
5816
|
-
* }
|
|
5817
|
-
*
|
|
5818
|
-
* const file = await read("changeset.md");
|
|
5819
|
-
* const result = await processor.process(file);
|
|
5820
|
-
* console.log(result.messages); // lint warnings
|
|
5821
|
-
* ```
|
|
5822
|
-
*
|
|
5823
|
-
* @see {@link SilkChangesetTransformPreset} for the corresponding transform preset
|
|
5824
|
-
*
|
|
5825
|
-
* @public
|
|
5826
|
-
*/
|
|
5827
|
-
declare const SilkChangesetPreset: readonly [import("unified-lint-rule").Plugin<Root, unknown>, import("unified-lint-rule").Plugin<Root, unknown>, import("unified-lint-rule").Plugin<Root, unknown>, import("unified-lint-rule").Plugin<Root, unknown>, import("unified-lint-rule").Plugin<Root, unknown>];
|
|
5828
|
-
/**
|
|
5829
|
-
* Ordered array of all transform plugins in the correct execution order.
|
|
5830
|
-
*
|
|
5831
|
-
* @remarks
|
|
5832
|
-
* Plugin ordering is significant -- each plugin may depend on the output of
|
|
5833
|
-
* earlier plugins in the pipeline:
|
|
5834
|
-
*
|
|
5835
|
-
* 1. {@link AggregateDependencyTablesPlugin} -- merge duplicate dependency sections (must run first so downstream plugins see a single Dependencies section)
|
|
5836
|
-
* 2. {@link MergeSectionsPlugin} -- merge duplicate h3 headings (must run before reorder so that priority is computed on consolidated sections)
|
|
5837
|
-
* 3. {@link ReorderSectionsPlugin} -- sort sections by category priority (Breaking Changes first, Other last)
|
|
5838
|
-
* 4. {@link DeduplicateItemsPlugin} -- remove duplicate list items within each section
|
|
5839
|
-
* 5. {@link ContributorFootnotesPlugin} -- extract inline `Thanks \@user!` attributions and aggregate them into a summary paragraph per version block
|
|
5840
|
-
* 6. {@link IssueLinkRefsPlugin} -- convert inline `[#N](url)` links to reference-style `[#N]` with definitions at the end of each version block
|
|
5841
|
-
* 7. {@link NormalizeFormatPlugin} -- final cleanup removing empty sections and empty lists
|
|
5842
|
-
*
|
|
5843
|
-
* @example
|
|
5844
|
-
* ```typescript
|
|
5845
|
-
* import { SilkChangesetTransformPreset } from "\@savvy-web/changesets/remark";
|
|
5846
|
-
* import remarkGfm from "remark-gfm";
|
|
5847
|
-
* import remarkParse from "remark-parse";
|
|
5848
|
-
* import remarkStringify from "remark-stringify";
|
|
5849
|
-
* import { unified } from "unified";
|
|
5850
|
-
* import { read } from "to-vfile";
|
|
5851
|
-
*
|
|
5852
|
-
* const processor = unified().use(remarkParse).use(remarkGfm);
|
|
5853
|
-
* for (const plugin of SilkChangesetTransformPreset) {
|
|
5854
|
-
* processor.use(plugin);
|
|
5855
|
-
* }
|
|
5856
|
-
* processor.use(remarkStringify);
|
|
5857
|
-
*
|
|
5858
|
-
* const file = await read("CHANGELOG.md");
|
|
5859
|
-
* const result = await processor.process(file);
|
|
5860
|
-
* console.log(String(result));
|
|
5861
|
-
* ```
|
|
5862
|
-
*
|
|
5863
|
-
* @see {@link SilkChangesetPreset} for the corresponding lint preset
|
|
5864
|
-
*
|
|
5865
|
-
* @public
|
|
5866
|
-
*/
|
|
5867
|
-
declare const SilkChangesetTransformPreset: readonly [import("unified").Plugin<[], Root>, import("unified").Plugin<[], Root>, import("unified").Plugin<[], Root>, import("unified").Plugin<[], Root>, import("unified").Plugin<[ContributorFootnotesOptions?], Root>, import("unified").Plugin<[], Root>, import("unified").Plugin<[], Root>];
|
|
5868
|
-
declare const ContentStructureRule: import("unified-lint-rule").Plugin<Root, unknown>;
|
|
5869
|
-
declare const DependencyTableFormatRule: import("unified-lint-rule").Plugin<Root, unknown>;
|
|
5870
|
-
declare const HeadingHierarchyRule: import("unified-lint-rule").Plugin<Root, unknown>;
|
|
5871
|
-
declare const RequiredSectionsRule: import("unified-lint-rule").Plugin<Root, unknown>;
|
|
5872
|
-
declare const UncategorizedContentRule: import("unified-lint-rule").Plugin<Root, unknown>;
|
|
5873
4728
|
declare namespace index_d_exports {
|
|
5874
|
-
export {
|
|
4729
|
+
export { AppliedRelease, AppliedReleaseEntry, AppliedReleaseEntrySchema, AppliedReleaseSchema, ApplyOptions, ApplyStep, BranchAnalysis, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerShape, BranchFileEntry, BranchFileEntrySchema, BumpType, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceShape, ChangelogTransformer, Changeset, ChangesetIOError, ChangesetLinter, ChangesetLogMode, ChangesetLogModeValue, ChangesetOptions, ChangesetOptionsSchema, ChangesetPreview, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, Classification, ClassificationReason, ClassificationReasonSchema, ClassificationSchema, CoexistingChangeset, CoexistingChangesetSchema, CommitHashSchema, ConfigInspector, ConfigInspectorShape, ConfigurationError, DependencyAction, DependencyActionSchema, DependencyTable, DependencyTableRow, DependencyTableRowSchema, DependencyTableSchema, DependencyTableType, DependencyTableTypeSchema, DependencyType, DependencyTypeSchema, DependencyUpdate, DependencyUpdateSchema, DepsRegen, DepsRegenDefault, DepsRegenExecuteOptions, DepsRegenOptions, DepsRegenPlanError, DepsRegenShape, FileStatus, FileStatusSchema, GitError, GitHubApiError, GitHubCommitInfo, GitHubInfo, GitHubInfoSchema, GitHubService, GitHubServiceShape, GlobSchema, HookReplayError, InspectedConfig, InspectedConfigSchema, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfig, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, LintMessage, MaintenanceNoteOptions, MaintenanceReason, MaintenanceReasonSchema, MaintenanceTrigger, MaintenanceTriggerSchema, MakeChangelogFunctionsOptions, MarkdownParseError, ContentStructureRule as MarkdownlintContentStructureRule, DependencyTableFormatRule as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule as MarkdownlintRequiredSectionsRule, UncategorizedContentRule as MarkdownlintUncategorizedContentRule, NonEmptyString, PackageScope, PackageScopeSchema, PackagesRecordSchema, PendingChangeset, PendingChangesetSchema, PositiveInteger, PreviewRelease, PreviewReleaseSchema, RegenDiffRow, RegenDiffRowSchema, RegenPlan, RegenPlanSchema, RegenResult, RegenResultSchema, RegenStep, ReleasePlanError, ReleasePlanner, ReleasePlannerShape, RepoSchema, ResolvedPackageScope, ResolvedPackageScopeSchema, ResolvedVersionFile, ResolvedVersionFileSchema, SectionCategory, SectionCategorySchema, SilkChangesetsRules, SnapshotOptions, TransformOptions, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfig, VersionFileConfigSchema, VersionFileError, VersionFileUpdate, VersionFileUpdateRecord, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionType, VersionTypeSchema, WorkspaceDependencyDiff, WorkspaceVersion, changelogFunctions, computeWorkspaceDependencyDiffs, deriveMaintenanceReason, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeChangelogFunctions, makeConfigInspectorTest, makeDepsRegenDefault, makeGitHubTest, makeReleasePlannerTest, parseChangesetPackages, serializeDependencyTableToMarkdown, vanillaChangelogFunctions };
|
|
5875
4730
|
}
|
|
5876
4731
|
/**
|
|
5877
4732
|
* Release format type for the release commit type.
|