Modernize #1: {P,}NPM Workspace-ify obsidian-{calendar-plugin, calendar-ui, daily-notes-interface} for saner continuing dev#366
Open
donaldguy wants to merge 94 commits intoliamcain:masterfrom
Open
Conversation
Support files in nested folders; add jest tests
* Also properly parse weekly formats with D{1,4}
* Bump dependencies
… them (liamcain#10) * Properly check that periodic notes' settings are enabled before using them * Bump version 0.7.5 * Fix linting
* Use xor when parsing week dates with month day * Remove test.only
* Remove XOR * bump version
* Fix path join function * add tests; bump version
* Fix path join function * fix yarnlock
* Add math to templates * add default format for math * Bump version * Add quarters * use feature version
* Add math to weekly notes * bump deps
This seems to work same as 1.5.10 [after clone into `.obsidian/plugins` and `npm install` OR `pnpm install` ] (the final rollup "claims" it doesn't know where to find "obsidian-daily-notes-interface" at the typescript stage; [adding a moduleResolution: node to tsconfig surprisingly no help], but everything ends up in the output main.js) Note: pins back down to 0.12.0 of obsidian-api
donaldguy
commented
Jun 15, 2024
package.json
Outdated
| "scripts": { | ||
| "lint": "svelte-check && eslint . --ext .ts", | ||
| "build": "npm run lint && rollup -c", | ||
| "postinstall": "npm run build --workspace=packages/daily-notes-api && npm run build --workspace=packages/ui", |
Author
There was a problem hiding this comment.
This is outmoded/removed by next commit in favor of package-local prepares
donaldguy
commented
Jun 15, 2024
Comment on lines
+24
to
+25
| "obsidian-calendar-ui": "*", | ||
| "obsidian-daily-notes-interface": "*", |
Author
There was a problem hiding this comment.
pnpm provides the concept of a "workspace:^" pin but as far as I can tell vanilla npm wants you to keep your tracking "normal"; its a matter of style imo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I started (i.e. spent all Wednesday night) working with the 2.0-beta stuff but decided to jump back to start with what works (then maybe look to re-base over whats worth keeping).
Note: for now pulled the pin on
obsidianback to0.12.0(and not further as0.11.Xmakes this version oftscangry)Herein find 2-4 actual logical changes:
[
8f381cf] =git subtree add --prefix=packages/daily-notes-api https://github.com/liamcain/obsidian-daily-notes-interface 97f4c8e47c1dffeed640f2cdc96fe7849edec532(i.e. v0.9.0 ; .1 - .4 to follow as makes sense)[
b26fb15] =git subtree add --prefix=packages/ui https://github.com/liamcain/obsidian-calendar-ui.git 03ceecbf6d88ef260dadf223ee5e483d98d24ffc(i.e. 0.3.12)Both of those could be squashed down if you support premise but not pulling over full histories
[
aa3543d] = rip out Yarn v1 in favor of dealer's choice of:pointedly things which support workspaces of packages. (I started on using Yarn >= 2 (berry) but honestly, I don't see a point unless you have strong Meta-loyalty)
[
b9e7c53] = make sufficient to get started1: A) clone repo (into.obsidian/pluginsof a vault) & B)npm install(orpnpm install)obsidian-daily-notes-interfacebuildto just usetscto emitdist/mjs/*.jswith corresponding.ts.ds and.ts.d.maps-uibundle.cjsset asmainfor the holdouts, if anypreparehooks on the two sub-packagesMore commits to follow
Footnotes
generate a working
main.jsequivalent to current published plugin (1.5.10) ↩