Skip to content
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

Add initial test vault #399

Merged
merged 5 commits into from
Sep 16, 2023
Merged

Conversation

julesvirallinen
Copy link
Contributor

@julesvirallinen julesvirallinen commented Sep 14, 2023

relates #396

Adds test vault. The dev experience is actually pretty nice! It can be opened directly in obsidian and published. Has some digital garden functionality already, but optimally it would contain every single supported flag / feature in documented files.

PS I dreamed of a world where there are snapshot tests for the generated garden files, and it seems relatively easy? This would make developing the plugin relatively safe, as they should catch almost any bug in the Publisher.

The cool part: by having a test vault you can already kinda do this from now on!

NOTE: I make a huge cybersecurity antipattern by adding a file into git. issue here: #398

CleanShot 2023-09-14 at 22 07 51@2x CleanShot 2023-09-14 at 22 08 49@2x

package.json Outdated
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"copyfiles": "^2.4.1",
"@types/lz-string": "^1.5.0"
Copy link
Contributor Author

@julesvirallinen julesvirallinen Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably didn't mean to be in non dev-dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm WARN deprecated @types/[email protected]: This is a stub types definition. lz-string provides its own type definitions, so you do not need this installed.

lol i guess it shouldn't be there anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hot reloads the dev vault on changes

Comment on lines +27 to +31
{
"pattern": "❄️",
"flags": "g",
"replace": "🌞"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settings go here! 🌞

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you mentioned, the githubtoken field being part of this is not great. But I've enabled push protection, meaning github should block anyone from pushing a token to this repository. But that still means people forking this won't have the same protection. Perhaps a good quick fix til we can think of something better is to add this file to .gitignore. At least then you would have to purposefully remove it from ignored if you need to push any changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that might work. I've noticed that git has gotten hard about having a file in the repo and gitignore at the same time. I think they've changed it a little because of secrets. We can try that yeah, or just a quick generator. OR some backdoor into the app or something to add it via an override file so it doesn't need to be set there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might wanna gitignore this file, but it does serve as a nice resource too.

@julesvirallinen julesvirallinen force-pushed the addTestingGarden branch 2 times, most recently from 8c05259 to f50a2d5 Compare September 14, 2023 21:11
@oleeskild
Copy link
Owner

Great work! I think this will have make major improvements on quality of both dev experience and software quality going forward

@oleeskild oleeskild merged commit 241074c into oleeskild:main Sep 16, 2023
3 of 4 checks passed
@julesvirallinen julesvirallinen deleted the addTestingGarden branch September 16, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants