-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update deps, upgrade to use Vite 3, fix broken API docs #145
Conversation
@wipfli ready to be merged. |
const parsedFileName = path.match(/\/(\d+)\s([^/]+)\./); | ||
const index = parseInt(parsedFileName[1]); | ||
const name = parsedFileName[2]; | ||
export const examples = Object.entries(import.meta.glob<ModuleNamespace>("./examples/**.svelte", { eager: true })).map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
globEager
has become deprecated in Vite 3. Hence the upgrade.
@@ -14,7 +14,7 @@ | |||
"files": [ | |||
"dist" | |||
], | |||
"module": "./dist/maplibre-gl-directions.es.js", | |||
"module": "./dist/maplibre-gl-directions.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vite 3 generated module.js
for ESM and module.cjs
for CommonJS. In Vite 2 it was module.es.js
and module.js
respectively.
"svelte-preprocess": "^4.10.7", | ||
"tailwindcss": "^3.1.8", | ||
"tslib": "^2.4.0", | ||
"typedoc": "^0.22.18", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many backwards-incompatible updates between 0.22 and 0.23. Rollback to use 0.22 is an easier fix.
@@ -13,7 +13,7 @@ export default defineConfig({ | |||
|
|||
lib: { | |||
entry: "src/main.ts", | |||
formats: ["es"], | |||
formats: ["es", "cjs"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case someone decides to use in a Webpack-based app (AFAIK, Webpack still doesn't support ES Modules up to this day 😕).
Thanks for this pull request, @smellyshovel. I get a build error:
|
If I use |
Yeah, I also installed the deps with |
I guess calling npm ci before npm i can work as a workaround, but starting from a clean installation, the instructions in the contributing guide should work... |
@wipfli updated the CONTRIBUTING's "troubleshooting" section. Since the build passes both here and for me and for you, I don't think anything should be done to solve the initial issue (that turns out not to exist at all). I think it's some caching (or whatever) related problem of NPM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smellyshovel! I run this pull request in a clean GitHub codespaces environment and everything worked. So probably this was just my local environment. Sorry for the trouble...
Update the dependencies. Use Vite 3. Rollback to TypeDoc 0.22 (resolves #135). Provide CommonJS build (just in case someone needs it).