-
Notifications
You must be signed in to change notification settings - Fork 649
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 dateformat requirement to latest (5.0.3) #1324
Comments
I wonder how that version specification gets produced? In this repository's package.json file, the dependencies section is empty Line 42 in cdbb965
But in the 0.25.6 package, I see the older version specified foam/packages/foam-vscode/package.json Line 702 in cdbb965
|
The dependency is defined in |
Thanks! Created my first pull request ever; attached for your review. |
Since 4.5.1 supports the appropriate padded week codes and compiles with foam, we'll go to 4.5.1 instead of any higher ECMAscript version. |
Add jest to devDependencies in top-level package.json.
Describe the bug
Installed foam 0.25.6 on VS Code 1.85.1. Set preference to make weekly notes with:
(yyyy subdirectory, filename 2-digit year, hyphen, padded week number, based on the documentation at https://www.npmjs.com/package/dateformat for version 5.0.3, published two years ago)
Today is Monday, 15 January, the third week of the year. On opening the daily (weekly) note, the created filename is:
2024/24-33.md
. I expected2024/24-03.md
. Thought, this is probably a regular expression problem in dateformat.But looking in my ~/.vscode/extensions/foam.foam-vscode-0.25.6/package.json, there is a line:
and indeed, in that version of dateformat https://www.npmjs.com/package/dateformat/v/3.0.3 (six years ago), there is only support for the single
W
, not paddedWW
format.Can we update the required dateformat version to 5.0.3?
Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
"foam.openDailyNote.filenameFormat": "yyyy-WW",
Expected behavior
I expected to be able to use any of the date formats specified in https://www.npmjs.com/package/dateformat, linked from the settings, but because the required dateformat version is 3.0.3, which does not support {
DDD
,DDDD
,p
, orWW
}, when I use those formats in the "foam.openDailyNote.filenameFormat" setting, I get unexpected results.In particular, in January,
WW
should return 03, but I get 33 instead.Screenshots or Videos
No response
Operating System Version
ChromeOS
Visual Studio Code Version
1.85.1
Additional context
No response
The text was updated successfully, but these errors were encountered: