From 2873df693b6e62995c61f95dcba92ef85a7e218f Mon Sep 17 00:00:00 2001 From: Robbie Wagner Date: Fri, 24 May 2024 08:47:09 -0400 Subject: [PATCH] Fix TS issues, more correctly ship CJS and ESM (#2820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "🐛 Fixes import issues reported in 2785 (#2805)" This reverts commit 5dc80bc9842539005619a8aff41d78ae89fd3243. * Make type module * Split into two dist dirs * Add attw to CI * Explicitly set path to cjs * Remove default * Split output into multiple files * Reexport svelte components * Use babel instead of rollup-plugin-typescript * Generate types on postbuild * Use plugins directly * Make eslint cjs * Update package.json * Fix paths * Fix css paths * Go back to one input file for now * Update rollup.config.mjs * Move shepherd to deps of cypress * Generate svelte declarations * Update rollup.config.mjs * Rename declarations to cts for cjs * Fix CJS export * Remove index * Fix types check command * Ignore remaining issues * Use api-extractor to rollup types * Fix lint * Fix cjs export * Remove extra types * Export all the things * Update .npmignore * Go back to multiple files * Go back to all the old stuff * Trying rollup-plugin-ts * Update rollup.config.mjs * Go back to esm and cjs folders * Fix lint * Add renamer * Update rollup.config.mjs * Remove unnecessary deps * Update types * Update MainPage.astro * Manually copy declarations * Various tweaks --------- Co-authored-by: Chuck Carpenter --- docs-src/src/content/docs/guides/install.mdx | 4 +- landing/src/layouts/MainPage.astro | 2 +- pnpm-lock.yaml | 552 ++++++++++++++--- shepherd.js/.eslintignore | 1 - shepherd.js/{.eslintrc.js => .eslintrc.cjs} | 0 shepherd.js/.npmignore | 2 - .../{babel.config.js => babel.config.cjs} | 4 + shepherd.js/errors.json | 577 ++++++++++++++++++ shepherd.js/package.json | 49 +- shepherd.js/rollup.config.mjs | 130 +++- shepherd.js/scripts/postprocess.js | 7 - shepherd.js/src/evented.ts | 4 +- shepherd.js/src/step.ts | 11 +- shepherd.js/src/tour.ts | 15 +- shepherd.js/svelte.config.js | 14 +- shepherd.js/tsconfig.json | 11 +- test/cypress/dummy/index.html | 4 +- .../cypress/examples/destroying-elements.html | 4 +- test/cypress/package.json | 4 +- 19 files changed, 1230 insertions(+), 165 deletions(-) rename shepherd.js/{.eslintrc.js => .eslintrc.cjs} (100%) rename shepherd.js/{babel.config.js => babel.config.cjs} (64%) create mode 100644 shepherd.js/errors.json delete mode 100644 shepherd.js/scripts/postprocess.js diff --git a/docs-src/src/content/docs/guides/install.mdx b/docs-src/src/content/docs/guides/install.mdx index 1dfc4a9e0..69559a393 100644 --- a/docs-src/src/content/docs/guides/install.mdx +++ b/docs-src/src/content/docs/guides/install.mdx @@ -50,11 +50,11 @@ with: ```html ``` diff --git a/landing/src/layouts/MainPage.astro b/landing/src/layouts/MainPage.astro index 942948636..00724d178 100644 --- a/landing/src/layouts/MainPage.astro +++ b/landing/src/layouts/MainPage.astro @@ -109,4 +109,4 @@ const shepherdIncludeCode = `