Skip to content

v0.2.0

Compare
Choose a tag to compare
@Ayc0 Ayc0 released this 20 Mar 20:05
· 7 commits to main since this release

@blocz/mdx-live

  • Upgrade for MDX 2 BREAKING CHANGE
  • Switch to ESM only (it depends on @mdx-js/mdx that also switched to ESM only) BREAKING CHANGE
  • Add exports field in package.json
  • Add peer dependency on @mdx-js/mdx BREAKING CHANGE
  • Add support for recmaPlugins in addition to rehypePlugins and remarkPlugins in MDX props
  • useMDX can accept all kind of plugins
  • Add isReady in useMDX return object
  • Bundle size was reduced from 1.6 MB to 21.9 kB (-98.6%)

@blocz/mdx-plugin-detect-imports

  • Update for MDX 2 (but still in CJS, and compatible in ESM) BREAKING CHANGE

  • Add exports field in package.json

  • Can only be used in MDX async function (like compile) but not the sync ones (like compileSync) BREAKING CHANGE

  • Change format of ImportStatement to better represent named vs default exports: (BREAKING CHANGE)

    In v0.1.0:

    interface ImportStatement {
        module: string;
        imports: Array<{
            imported: string;
            local: string;
            value: any;
        }>;
    }

    Now in v0.2.0:

    interface ImportStatement {
        module: string;
        imports: Array<
            | {
                  kind: "named";
                  imported: string;
                  local: string;
                  value: any;
              }
            | {
                  kind: "namespace" | "default";
                  local: string;
                  value: any;
              }
        >;
    }

@blocz/detect-imports

Removed because no longer needed

@blocz/mdx-loader

Removed because already fully covered by the recommended @mdx-js/loader + @blocz/mdx-plugin-detect-imports plugin

Other changes

  • Upgraded to yarn v3.2.1
  • Add support for node 18 in addition to node 16
  • Add a few e2e tests

Full changelog: v0.1.0...v0.2.0