Closed the-j0k3r closed 4 years ago
Did you try 5.4.3? There was a important fix for projects with package-lock.json
.
yes, anything after 5.1.3 fails for me without output, is there any way to debug this? It was kind of sudden and no idea whats going on.
maybe one of the ver dependencies? I mean the regex literal change cant have been it, and only the ver dependencies have changed
Besides littering the code with console.log
? Probably not. No output at all is very strange, you should at least get a error message, given that the whole app is wrapped in a .catch
handler.
No output at all is very strange, you should at least get a error message, given that the whole app is wrapped in a .catch handler.
Should but dont
see
same with bash MINGW64 and powershell, exact same
Does it work if you rename package-lock.json
?
rename/delete package-lock.json
ver
repo and run npm install
in itnode <path to ver.js> -p patch wikipedia-dark.user.css
If that doesn't give you anything, start adding console.log
to ver.js
. Code flow starts in main()
.
OK
node C:\Users\Joker\Desktop\ver\ver.js -p patch wikipedia-dark.user.css
works (loosely) but
node C:\Users\Joker\Desktop\ver\ver.js -p -C patch wikipedia-dark.user.css
outputs fatal: paths 'fix ...' with -a does not make sense
also its been failing but bumping anyway cause it bumped from version 2.3.14 to version 2.3.18 but its starnge cause theres no tags for all those in between 15~18 versions The next logical bump would be 2.3.15 but it missed that also.
Back to square 0, doesnt work
So you can nail it down to -C
? I am aware that -C
currently has issues and will fail at escaping some characters for the shell. I need to switch to using array-form arguments for execa
to fix that.
If you want to find the specific commit when a issue was introduced, git bisect
is very handy (make sure to rm -rf node_modules && npm i
on each step).
also its been failing but bumping anyway
Yes, I noticed that too. I think better error handling and/or delaying those file writes should help with that.
Well I already said that v5.1.3 works anything else newer doesnt, is that a good git bysect?
So you can nail it down to -C?
Well I can say that without doing this node C:\Users\Joker\Desktop\ver\ver.js -p patch wikipedia-dark.user.css
everytime is an actual success.
But sure -C conked out here too, the problem isnt -C the actual problem is the basic functionality no longer works for me without that long workaround. +(
updated to ver 5.4.4 test.
Now here is the interesting part
package-lock.json
and node_modules
apm i
npm run patch
and low and behold the same exact thing happened as gif above
No installing anything no error just the same output even though node_modules isnt there.Same result as above on ver 5.4.4 Windows 10 Enterprise Version 10.0.18362.356 or 10.0.18362.418 node v10.16.0 npm 6.12.0
ver 5.1.3 works fine
So the problem is this line:
await run(`git commit -a ${commitMsgString}`, {nocmd: true});
If the commitMsgString
is multiple lines, I see this message when I run ver
directly:
fatal: paths 'Darken ...' with -a does not make sense
The "Darken" is from my last commit, and here is a console log of the commitMsgString
(I'm not sure why it's going so far back in the history):
-m '2.3.16' -m '* Darken white background. Fixes #88 (Rob Garrison)
* Fix CodeMirror indention issue (Rob Garrison)
* international landig page fixes (the-j0k3r)
* global update ver (the-j0k3r)
* 2.3.15 (silverwind)
* fix table headers color (the-j0k3r)
* fix tmbox colors (the-j0k3r)
* fix tables border and bg color (the-j0k3r)
* brighten cbnnr-close (the-j0k3r)
* dont add borders to frameless elements (the-j0k3r)
* fix topic title bar (the-j0k3r)
* invert spech bubbles (the-j0k3r)
* fix tt background white (the-j0k3r)
* add chnagelog on bumping (the-j0k3r)
* remove npx (the-j0k3r)
* remove linux only commands that fail windows side (the-j0k3r)
* global update deps (the-j0k3r)
* 2.3.14 (Eddie James Carswell II)
* More minor fixes (Eddie James Carswell II)
* 2.3.13 (the-j0k3r)
* various fixes see description... (the-j0k3r)
* 2.3.12 (the-j0k3r)
* fix unstyled elemnets in ru wiki closes #87 (the-j0k3r)
* 2.3.11 (Eddie James Carswell II)
* Minor element fixes for mobile style (Eddie James Carswell II)
* sidebar section underline brightness fix (the-j0k3r)
* 2.3.10 (Eddie James Carswell II)
* Fix portlet link bullets, transparent bg for diffs (Eddie James Carswell II)
* prevent CRLF (the-j0k3r)
* 2.3.9 (Eddie James Carswell II)
* More fixes for wikiEd (Eddie James Carswell II)
* Minor fixes for ruwiki (Eddie James Carswell II)
* Consolidate diff colors, convert rgba to variables (Eddie James Carswell II)
* Fix Wikidata referenceview and kbd tags on mobile (Eddie James Carswell II)
* Move ScriptInstaller fixes (Eddie James Carswell II)
* 2.3.8 (the-j0k3r)
* fix bright headers in ru.wiki fixes #86 (the-j0k3r)
* Meta: Center README badges and add logo (Eddie James Carswell II)
* Meta: Add build status to README (Eddie James Carswell II)
* 2.3.7 (Eddie James Carswell II)
* Meta: Update devDependencies (Eddie James Carswell II)
* Restore heading colors for article assessment gadget (Eddie James Carswell II)
* Fixes for the score extension and ScriptInstaller (Eddie James Carswell II)
* Fixes for diff revision slider gadget, warning box color (Eddie James Carswell II)
* 2.3.6 (the-j0k3r)
* fix white table in ru wiki fixed #85 (the-j0k3r)
* 2.3.5 (Eddie James Carswell II)
* Fixes #84, plus other minor Wiktionary tweaks (Eddie James Carswell II)
* Move changes to correct style block :/ (Eddie James Carswell II)
* 2.3.4 (Eddie James Carswell II)
* Watchlist and recent changes fixes (Eddie James Carswell II)
* Fully fix #82, move flagged revs fix to main style (Eddie James Carswell II)
* 2.3.3 (Eddie James Carswell II)
* Minor fixes for Wiktionary, Wikinews, Wikivoyage, Wikispecies, and Incubator (Eddie James Carswell II)
* Fix white headbar in the search page (TotalCaesar659)
* 2.3.2 (Eddie James Carswell II)
* Fixes for Wikipedia landing page (Eddie James Carswell II)
* Convert black to var (Eddie James Carswell II)
* Palette tweaks, fix regex to match project landing pages (Eddie James Carswell II)
* fix regex (the-j0k3r)
* 2.3.1 (the-j0k3r)
* sidebar + color add fixes (the-j0k3r)
* fix ttps://www.wikipedia.org was all white (the-j0k3r)
* partially fix #82 (the-j0k3r)
* Meta: Updated readme with mobile screenshot, added badges (Eddie James Carswell II)
* 2.3.0 (Eddie James Carswell II)
* Sync ORES color changes, fixes for episode list tables (Eddie James Carswell II)
* Main page fixes for ruwiki (fixes #81) (Eddie James Carswell II)
* Merge branch '\''mobile-style'\'' (Eddie James Carswell II)
* Table color overrides, MathML and settings page fixes (Eddie James Carswell II)
* Reduce all borders to --gray-5 (Eddie James Carswell II)
* More polishing on mobile style (Eddie James Carswell II)
* Further element color fixes and general polish (Eddie James Carswell II)
* Cleanup: Combine selectors for duplicate declarations (Eddie James Carswell II)
* Fix diff colors (Eddie James Carswell II)
* Fix more article elements and templates (Eddie James Carswell II)
* Top bar icon tweaks (Eddie James Carswell II)
* Fixes for language picker and other article UI elements (Eddie James Carswell II)
* Color fixes for Watchlist (Eddie James Carswell II)
* Fixing broken element padding on RecentChanges (Eddie James Carswell II)
* More RecentChanges color fixes (Eddie James Carswell II)
* More ORES color fixes (Eddie James Carswell II)
* Begin dark theme skeleton for mobile style (Eddie James Carswell II)
* 2.2.17 (Eddie James Carswell II)
* Lots of cleanup and TLC, mostly on secondary sites (Eddie James Carswell II)'
Ahh, I didn't use git fetch
to get all the previous tags; that's why the history is so long.
Will switch to array form args for git commands which should work better at handling such cases because the shell is not involved.
The missing tags is interesting. I thought git pull
would always get you the latest remote tags. How come you're missing them?
Actually, it appears neither fetch
nor pull
retrieve tags by default, so one has to do git pull --tags
to get them. I never noticed this not being the default because I have a alias that includes --tags
and I guess we have to recommend that for the changelog feature to work as expected.
Pushed ver@6 which uses array form for git
commands which should work much better with the -C
argument. Also the important commands are now always printed on the console, so even if they error, it should be visible why it failed.
I'm still contemplating whether -C
should do a git fetch --tags
.
I'm still contemplating whether
-C
should do agit fetch --tags
.
I think it would be wiser rather than documenting the need for it, that way it works out of the box though I would document the addition.
My alias setup for fork origin/upstream sync also fetches tags automatically with git fetch --tags
Test ver 6.0.0, no dice. its exactly as all previous attempts and documented in gifs and posts, going back to ver 5.1.3 works
and this is without -C
switch, this is vanilla patch/minor/major without any switches including -p
see https://github.com/silverwind/ver/issues/12#issuecomment-542770438
Edit in GitHub Dark same
EDIT
In GitHub Dark same though theres more output.
> grunt patch
build.json not found - using defaults
Running "patch" task
Running "lint" task
Running "exec:eslint" (exec) task
Running "exec:stylelint" (exec) task
Running "usercss" task
Running "string-replace:inline" (string-replace) task
1 files created
Running "wrap:mozrule" (wrap) task
Wrapped 1 files
Running "exec:usercss" (exec) task
GitHub Dark usercss build complete
Running "exec:patch" (exec) task
Microsoft Windows [Version 10.0.17134.1099]
Done.
and no actual bump
Can reproduce the issue with it only printing the cmd
startup text, but no idea how to fix it. It's something about how npm installs/runs global script. Running ver.cmd
seems to work however. Did not try yarn
yet, maybe it does global scripts differently on Windows.
I use -NoLogo
for my powershell startup arg, but without theres no change except it prints the startup text, and bash MINGW64 also has same issues, makes no difference...
But why is it then that ver 5.1.3 bumping works and with 5.1.4 and newer doesn't?
But why is it then that ver 5.1.3 bumping works and with 5.1.4 and newer doesn't?
I don't see that. For me, any version of ver
does not work, but ver.cmd
always works. I'd suggest checking .npmrc
in your homedir and possibly deleting/moving %APPDATA%/Roming/npm
, maybe your global modules are stale.
I'd suggest checking
.npmrc
in your homedir
No .npmrc
in my homedir but in %APPDATA%/Roming/npm/etc/nmrpc
has this content.
python=C:\Users\Joker\.windows-build-tools\python27\python.exe
and possibly deleting/moving
%APPDATA%/Roming/npm
, maybe your global modules are stale
Yep thanks for that tip and done. Sadly nothing changed.
Well I found out why I get this annoying MS ver string printed at the end Microsoft Windows [Version 10.0.17134.1099]
ever since this issue manifested,
Seems that typing ver in the cmd prompt outputs this, but Ive no idea why it shows up in powershell.
Im thoroughly lost.
Ah, I see the ver
command is actually a cmd
builtin which takes precedence, lol. So I guess I chose a bad name for the module. Maybe try modifying your PATH
so node modules comes first, thought I fear builtin's may always come first.
npx ver
should always work, thought global ver
may be a lost case on Windows.
Ah, I see the
ver
command is actually acmd
builtin which takes precedence, lol. So I guess I chose a bad name for the module. Maybe try modifying yourPATH
so node modules comes first, thought I fear builtin's may always come first.
Like I said the issue wasnt there when ver was bumping OK. So maybe it will go back to normal when ver works again.
I feel withdrawal symptoms from not being able to use ver... lol
Wow, so weird.
In the wikipedia repo, if I add some console logs to ver.js
:
Using npm run patch
does nothing. I believe the ver
for Windows is run instead of this module.
Using node ./node_modules/ver/ver.js -p -C patch wikipedia-dark.user.css
, I see this error (again):
Error: No replacement made in X:\Repos\+StylishThemes\Wikipedia-Dark\package-lock.json
at updateFile (X:\Repos\+StylishThemes\Wikipedia-Dark\node_modules\ver\ver.js:185:11)
at async main (X:\Repos\+StylishThemes\Wikipedia-Dark\node_modules\ver\ver.js:328:7)
The package.json
and the css files both have an updated version.
If I comment out the package-lock section of the code and run node ./node_modules....
, it works! But, I see this commit message (Note: I DO have both the v.2.3.17 and v2.3.16 tags already included, visible using gitk
).
v2.3.18
* Darken Russian headbar. Fixes #90 (Rob Garrison)
* global: update deps (the-j0k3r)
* 2.3.17 (Rob Garrison)
* Meta: update dependencies (Rob Garrison)
* Darken home page. Fixes #89 (Rob Garrison)
* 2.3.16 (Rob Garrison)
* Darken white background. Fixes #88 (Rob Garrison)
* Fix CodeMirror indention issue (Rob Garrison)
* international landig page fixes (the-j0k3r)
* global update ver (the-j0k3r)
Here is an actual representation between working node_modules and ver combination and broken I think theres some actual dependency causing this rather than ver directly. But there was no way to see what changed in background.
Perhpas someone can actually spot something there that triggers some ahah! moment.
I created a branch for stackoverflow based on master and my local node_modules and package-lock.json, using ver 5.1.4 there works.
See https://github.com/StylishThemes/StackOverflow-Dark/commits/ver-working
then when running npm run update
https://github.com/StylishThemes/StackOverflow-Dark/commit/c47d9523f5b6fe9cef6951e91c628690dca81756 after that ver npx ver -p patch stackoverflow-dark.user.css
no longer works.
@Mottie can you check if your package-lock.json
actually contains a version string? Mine generated via npm 6.12.0 sure does:
$ head package-lock.json
{
"name": "wikipedia-dark",
"version": "2.3.19",
I see a few improvements to make:
cmd
compatibiltypackage-lock.json
as some versions of that file may not contain a version apparently.your
package-lock.json
actually contains a version string
Yes, it does
{
"name": "wikipedia-dark",
"version": "2.3.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {...}
}
}
I think it's because I removed the v2.3.18 tag and did a hard reset to test, but because the package-lock.json
is in .gitignore
, the reset didn't touch that file; so it was already 2.3.18.
I just used node ./node_modules/ver/ver.js -p -C patch wikipedia-dark.user.css
for v2.3.19
and it worked, except for including a commit history going back to v2.3.15
.
Does git tag
show the tags inbetween? If yes, what about git show v2.3.18 --
?
I think it's because I removed the v2.3.18 tag and did a hard reset to test, but because the package-lock.json is in .gitignore, the reset didn't touch that file; so it was already 2.3.18.
Replacement in package-lock.json
is actually done via JSON.parse + JSON.stringify, so it's very weird that that failed. Will try to debug this later.
Does
git tag
show the tags inbetween
v2.3.0
v2.3.1
v2.3.10
v2.3.11
v2.3.12
v2.3.13
v2.3.14
v2.3.15
v2.3.16
v2.3.17
v2.3.18
v2.3.19
v2.3.2
v2.3.3
v2.3.4
v2.3.6
v2.3.7
v2.3.9
what about
git show v2.3.18 --
> git show v2.3.18 --
commit a60d3527729b39a57824e9df238ef0a1f5399d75 (tag: v2.3.18)
Author: Rob Garrison <wowmotty@gmail.com>
Date: 2019-10-21
2.3.18
diff --git a/package.json b/package.json
index af77c23..bf13e3c 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "wikipedia-dark",
"title": "Wikipedia Dark",
- "version": "2.3.17",
+ "version": "2.3.18",
"description": "Wikipedia Dark theme",
"license": "CC-BY-SA-4.0",
"repository": "https://github.com/StylishThemes/Wikipedia-Dark",
diff --git a/wikipedia-dark.user.css b/wikipedia-dark.user.css
index 86adb67..6fa34dc 100644
--- a/wikipedia-dark.user.css
+++ b/wikipedia-dark.user.css
@@ -1,7 +1,7 @@
/* ==UserStyle==
@name Wikipedia Dark
@namespace StylishThemes
-@version 2.3.17
+@version 2.3.18
@description Wikipedia Dark theme
@author StylishThemes
@homepageURL https://github.com/StylishThemes/Wikipedia-Dark
6.0.1 still no dice with basic functionality.
I would like to re-iterate https://github.com/silverwind/ver/issues/12#issuecomment-544861035 and that Im currently ignoring the -C functionality altogether, I originally mentioned it due to being the only error I had when reporting this.
The only repo I have ver working is stackoveflow dark any upgrades of deps will break that also like everywhere else deps have been upgraded.
6.0.2 still no joy, and again without -C
from gruntfile modified patch to ver -p -d patch github-dark.css github-dark.user.css
Also interesting running that command on terminal yields
Error: Cannot find module 'C:\Users\Joker\AppData\Roaming\npm\node_modules\ver\ver.js'
?[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:687:27)?[39m
?[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)?[39m
?[90m at internal/main/run_main_module.js:17:11?[39m {
code: ?[32m'MODULE_NOT_FOUND'?[39m,
requireStack: []
}
So I installed ver globally npm i ver -g
> ver -p -d -C patch github-dark.css github-dark.user.css
Error: No replacement made in C:\Users\Joker\github\GitHub-Dark-Upstream\package-lock.json
at updateFile (C:\Users\Joker\AppData\Roaming\npm\node_modules\ver\ver.js:190:11)
at async main (C:\Users\Joker\AppData\Roaming\npm\node_modules\ver\ver.js:333:7)
all files are bumped but not commited
deleted package-lock.json
> ver -p -d -C patch github-dark.css github-dark.user.css
+ git tag -a -f -F - v1.22.128
+ git commit -a -F -
[master dabbe436] v1.22.128
4 files changed, 5 insertions(+), 5 deletions(-)
however this is with ver globally installed, grunt patch still does nothing
Theres three issues
1) ver doesnt work without being global and issuing command on terminal implicitly. 2) the changelog part doesnt care if all tags are local it still pushed all previous tags
* global: update deps (the-j0k3r)
* brighten color for tag add/remove btns (the-j0k3r)
* fix tag add/remove button width (the-j0k3r)
* v1.22.127 (silverwind)
* automated regeneration (silverwind)
* brighten .table-list-header-toggle .btn-link (the-j0k3r)
* dont override .bg-blue-light (the-j0k3r)
* brighten suggestion a color (the-j0k3r)
* prevent perfectionist from chaging domain() position. (the-j0k3r)
* style support Mona Lisa searching img (the-j0k3r)
* add support site to gen and regenerate (the-j0k3r)
* global regenerate (the-j0k3r)
* add https://support.github.com/contact (the-j0k3r)
* global: clean (the-j0k3r)
* better fix for .settings-disabled-remove-email trashcan color (the-j0k3r)
* fix .settings-disabled-remove-email trashcan color (the-j0k3r)
* fix another bg-blue-light (the-j0k3r)
* fix .bg-blue-light (the-j0k3r)
* Style inline pending checks donut chart (Brian Surowiec)
* Fix text color of oauth permission level label (Brian Surowiec)
* Add #eaeaea to the generator (Brian Surowiec)
* Keep the border on .blankslate-capped elements (Brian Surowiec)
3) the actual tag commit is the previous commit to the bump
https://github.com/StylishThemes/GitHub-Dark/releases/tag/v1.22.128 tagged at 0af3005 corresponds to the the previous commit before bump and not tip of master including bump at https://github.com/StylishThemes/GitHub-Dark/commit/2d81283971a8eb18035d2ba0de09b99bc498dc46
for that last problem its happening in https://github.com/StylishThemes/Wikipedia-Dark/commit/3ed238a0b0362b26474879a285ef6e94ebff752f#comments
I have this problem with grunt too, must be installed globally. these days.
Ok I now find per above that installing ver globally works and I think I know why.
See the difference in packages in node_modules\ver\node_modules
between global and local.
~\AppData\Roaming\npm\node_modules\ver\node_modules> dir
Directory: C:\Users\Joker\AppData\Roaming\npm\node_modules\ver\node_modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 29/10/2019 09:59 .bin
d----- 29/10/2019 09:59 @nodelib
d----- 29/10/2019 09:59 braces
d----- 29/10/2019 09:59 cross-spawn
d----- 29/10/2019 09:59 end-of-stream
d----- 29/10/2019 09:59 execa
d----- 29/10/2019 09:59 fast-glob
d----- 29/10/2019 09:59 fastq
d----- 29/10/2019 09:59 fill-range
d----- 29/10/2019 09:59 find-up
d----- 29/10/2019 09:59 get-stream
d----- 29/10/2019 09:59 glob-parent
d----- 29/10/2019 09:59 human-signals
d----- 29/10/2019 09:59 is-extglob
d----- 29/10/2019 09:59 is-glob
d----- 29/10/2019 09:59 is-number
d----- 29/10/2019 09:59 is-stream
d----- 29/10/2019 09:59 isexe
d----- 29/10/2019 09:59 locate-path
d----- 29/10/2019 09:59 merge-stream
d----- 29/10/2019 09:59 merge2
d----- 29/10/2019 09:59 micromatch
d----- 29/10/2019 09:59 mimic-fn
d----- 29/10/2019 09:59 minimist
d----- 29/10/2019 09:59 npm-run-path
d----- 29/10/2019 09:59 once
d----- 29/10/2019 09:59 onetime
d----- 29/10/2019 09:59 p-finally
d----- 29/10/2019 09:59 p-limit
d----- 29/10/2019 09:59 p-locate
d----- 29/10/2019 09:59 p-try
d----- 29/10/2019 09:59 path-exists
d----- 29/10/2019 09:59 path-key
d----- 29/10/2019 09:59 picomatch
d----- 29/10/2019 09:59 pump
d----- 29/10/2019 09:59 reusify
d----- 29/10/2019 09:59 run-parallel
d----- 29/10/2019 09:59 semver
d----- 29/10/2019 09:59 shebang-command
d----- 29/10/2019 09:59 shebang-regex
d----- 29/10/2019 09:59 signal-exit
d----- 29/10/2019 09:59 strip-final-newline
d----- 29/10/2019 09:59 to-regex-range
d----- 29/10/2019 09:59 which
d----- 29/10/2019 09:59 wrappy
~\AppData\Roaming\npm\node_modules\ver\node_modules>
In the GitHub Dark clone of master
~\github\GitHub-Dark-Upstream\node_modules\ver\node_modules [master ≡]> dir
Directory: C:\Users\Joker\github\GitHub-Dark-Upstream\node_modules\ver\node_modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 30/10/2019 07:57 @nodelib
d----- 30/10/2019 07:57 fast-glob
d----- 30/10/2019 07:57 find-up
d----- 30/10/2019 07:57 locate-path
d----- 30/10/2019 07:57 minimist
d----- 30/10/2019 07:57 p-limit
d----- 30/10/2019 07:57 p-locate
d----- 30/10/2019 07:57 p-try
d----- 30/10/2019 07:57 path-exists
Next test,
1) copy global node_modules\ver\node_modules
into the GitHub Dark node_modules\ver\node_modules
2) run grunt patch
Result no change. ver STILL wont run locally even without -C
and globally with -C
still outputs wrong changelog messages and wrong commit hash.
running npm i
inside~/github/GitHub-Dark-Upstream/node_modules/ver
also yiels same package list as the global ver install, the only difference is ~/github/GitHub-Dark-Upstream/node_modules/ver/package-lock.json
exists.
None the less nothing seems to change in behavior, it seems local ver install is being ignored altogether.
I wonder if this is actually npm related as well. Seems Weird to just have stopped working.
OK this is almost definitely npm related.
I managed to get it to work.
Started with no global packages.
1) Install nodejs 10.6.0
2) in GitHub Dark npm i
3) in terminal npm i grunt grunt-cli -g
4) n GitHub Dark run grunt patch
Why must grunt and grunt-cli be global?
nodejs 12.x.x and 13.x.x fail did not try nodejs 11 and no way I know of to troubleshoot npm node/ issues but this is the closest Ive come.
Had to upgrade nodejs from 10.6.0 to 12.0.0 because running generate doesnt work e.g in GHD, surprisingly this keeps ver in a semi working state with the caveats as above.
I guess its a workaround the issue.
I guess its a workaround the issue.
the workaround works in GitHub Dark due to grunt, else needs ver globally installed for npm only repos.
I haven't really had problems with ver on my end, but I'm running Debian so that's probably why.
I was just trying to do a new release for GitHub-Selected-Tab-Color and fell on my face because of this. ver
no longer works for me, even rolling back to 4.3.0 which was used the last time I did a release in this repo.
The script here is even simpler than the ones being discussed, it's only ver -p patch github-selected-tab-color.user.css
. In order to do the release I had to run:
.\node_modules\.bin\ver.cmd -p patch github-selected-tab-color.user.css
No matter how I try to run ver
the Windows command always executes, even using npx ver
in the console and npm scripts. At this point would it be easier to ship an alias like ver2
with this so we could use that in the scripts?
I renamed the package to versions
to resolve the clash with Windows builtin ver
. Installing ver
will now give a deprecation warning.
I also found out that, if you install npx globally bumping works again, and of course re-adding npx to all repos is also necessary.
So you need, grunt, grunt-cli and npx globally installed in order to run this say in GitHub Dark Windows side, other repos just npx globally.
If you add "patch": "grunt patch"
to the npm scripts you can do a release with npm run patch
. There's no need to install anything globally (I just tried this on windows and it worked). All of these should probably be added anyhow since we were trying to move away from grunt and having them there will make it easier to migrate one task at a time.
The only part of my test that didn't work as expected was creating the tag, that still happened on the commit before the release.
C:\dev\GitHub\GitHub-Dark [master ≡]> git reflog
8440cde HEAD@{2}: commit: v1.22.139
3818d16 HEAD@{3}: commit: Update package.json
C:\dev\GitHub\GitHub-Dark [master ≡]> git tag -d v1.22.139
Deleted tag 'v1.22.139' (was 38969bb)
The only part of my test that didn't work as expected was creating the tag, that still happened on the commit before the release.
thats was fixed, ver needs to be updated in package.json
If you add
"patch": "grunt patch"
to the npm scripts you can do a release withnpm run patch
. There's no need to install anything globally (I just tried this on windows and it worked). All of these should probably be added anyhow since we were trying to move away from grunt and having them there will make it easier to migrate one task at a time.
well thats another way to do it, but I dont want to be adding grunt to repos that dont have it to fix a Windows/ Ver/npm issue in order to be able to works as before. Mind I dint understand why things only work with grunt/grunt-cli/npx installed globally in Github Dark
Other repos may vary but mostly need npx globally else they conk out.
@silverwind updated ver
in the GHD repo before my test, so that was done using 7.0.1 of versions
.
I dont want to be adding grunt to repos that dont have it
I'm not saying install grunt in the other repos, just that if you're using npm scripts you don't need to install the tools globally. Nor do you need npx.
In GHD you can also use the script "patch": "versions -p -d -C patch github-dark.css github-dark.user.css"
and then grunt isn't needed at all for this one (which is what the other repos are doing).
Yes, grunt is not needed and should be removed for simple tasks like that. I think there was actually a PR that did that.
BTW you can run module scripts without npx
, just run node node_modules/.bin/versions
. That's how we did things before there was npx
:)
Thats just silly too =)
Yes, grunt is not needed and should be removed for simple tasks like that. I think there was actually a PR that did that.
Yes https://github.com/StylishThemes/GitHub-Dark/pull/1019 but its stalled, I cant go further and the issues noted in https://github.com/StylishThemes/GitHub-Dark/pull/1015#issuecomment-544796988
the rest Ive no idea how to replace, so stalled. But npx needs to be re=added else windows side is stuffed with ver/versions
I don't think there's anything left to do here, so let's close it. If there is, open new issues.
@silverwind following https://github.com/silverwind/ver/issues/10 I have now made some changes to Wikipedia Dark https://github.com/StylishThemes/Wikipedia-Dark/commits/master
@mottie
upon running
npm run patch
No files are changed.
package-lock.json exists
reverting to ver @5.1.3 works
Ive tried:
removing node_modules reinstalling via
npm i
recloning downgrading nodejs from 12.12.0 to 10.16.3 and retrying all the above running command in powershell admin running command via bash (MINGW64)OS is Windows 10 pro 1803 build 17134.1069
edit also Microsoft Windows [Version 10.0.17134.1099]