After #208, id for each note in NoteGraph is hashed. However, in generateReferenceList in file wikilink-reference-generation.ts, the id is still given by the file path, which compromised the core functionality. This PR fixed this bug.
* decoupled ID from note slug
* added vscode debug configuration to work with vscode-jest extension
* made things prettier
* Add a test for parsing empty frontmatter
* Use astPositionToVsCodePosition util function
* fixed a TODOs around URIs and added tests
* added tests around notes querying
* removing unused imports
* Fix typo
* implemented PR feedback
* fixed lint warnings and renamed method for consistency
* removed unnecessary checks and fix compilation error in tests
Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
* Fill out Migrating from OneNote stub
* Update Summary and improve grammatic consistency
* Added terminal navigation instructions
* kebab-case and update roadmap links
* feat: setup jest for foam-vscode
* Add failing test (fails due to missing vscode dependency)
* feat: add vscode mock
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
* Add frontmatter data to NoteGraph node
* Store document start position inside NoteGraph node
* Add heading below the frontmatter
* Show a progress bar while running Janitor
* Fix tests
* Update note start position to make it 1-indexed
* Initialize frontmatter by an empty object instead of null
* Remove console logs
* Add how to update pushed Azure Wiki
Add the way to push to GitHub and Azure with one command.
* Update docs/azure-devops-wiki.md
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* Update azure-devops-wiki.md
Add suggested changes
* Update docs/azure-devops-wiki.md
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* revise vscode task and launch configs
- Removed commands from sub-package:
same can be achieved from the root
- Added build and no-build variants.
In case separate watcher is already running,
no need to build.
- Changed watch to build (no hot-reload in vscode by default)
- Show the build in console
Didn't update yarn.lock, seems to want to add
foam-core@0.3.0-alpha.0, but not really
related to this change
Note: the extension tests are failing due to
`Cannot find module '...foam-vscode/out/test/suite/index'`.
However that shouldn't be related to this change either.
* Simplify VS Code launch tasks (shift work to typescript compiler)
* Fix circular dependency index->janitor/index->index
* Use --build flag to use TSC in Build Mode
https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript
This configures tsc to use multiple project roots (vscode, core) and run incremental builds on
changes to each projects. This will necessitate us running the core in commonjs build mode,
which is fine for testing and deployment to node environments, but won't work in the browser,
so foam-core will need a separate build config for UMD builds
* Build foam-core in commonjs mode by default (+cleanup unnecessary config)
* Create ES6 build config for distribution builds
* Cleanup yarn.lock
* Build package before running
* Fix missing lint paths and fix lint error
* Remove redundant .vscode settings files from foam-vscode project
* Add core test launch task
Co-authored-by: jojanaho <janne.ojanaho@iki.fi>
* Update creating-new-notes.md
Added a non-intuitive hotkey for entering notes.
* Add instructions on how to remap the key binding
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
* Move applyTextEdit to core
* WIP: Add janitor command in foam-vscode
* basic janitor command done
* unsaved markdown janitor solved
* export bootstrap getConfig functions
* fixed multi unsaved files text edits
* Move applyTextEdit to core
* WIP: Add janitor command in foam-vscode
* basic janitor command done
* unsaved markdown janitor solved
* export bootstrap getConfig functions
* fixed multi unsaved files text edits
* Be less greedy about definitions, only include defs at end of file
* Use link reference definitions in janitor
* Add headers/footers to tests
* Ensure janitor doesn't touch unrelated reference definitions
* Format document, convert promise trampoline to async/await for readability
* Add error handling and friendly output
* Use workspace settings for extension
* Add flag to janitor
* Use note.eol
* Fix tests
Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
* adding recipe for migrating from Onenote
* Update docs/roadmap.md
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* Add notes to NoteGraph when they are created
* Add experimental events to foam-core to notify listeners about added/updated notes
* Update reference definitions in active editor when new note is added
* Update document in note graph before updating references