How do we use the latest API features? - visual-studio-code

I am developing an extension for VSCode, at https://code.visualstudio.com/docs/extensionAPI/vscode-api there are some functions which do not seem to be available yet:
vscode.window.withProgress(...)
vscode.window.showSaveDialog(...)
I have the following on my depedencies:
"vscode": "^1.1.14"
I am missing something to be able to use certain API functions ?

You may want to upgrade vscode dependency version
vscode.window.withProgress was introduced with vscode 1.12 (https://code.visualstudio.com/updates/v1_12)
As vscode try to keep itself updated you can use the latest vscode(1.21.1) version or 2-3 months old(1.17.0)
The vscode version needs to be changed on the packages.json "engines" section.

Related

What does "version" at the end of a Swift Package Manager Package.resolved file mean?

I am trying to figure out what "version": 1 or "version": 2 at the end of a Package.resolved file generated by Swift Package Manager stands for. I have two workspaces and sometimes the Package.resolved files have both version 1 or 2, sometimes different versions.
What kind of impact has having different versions and what is causing the version change? Is it possible to have the same versions for both?
I've done a bit of research and it seems Apple changed the format of the Package.resolved file with version 5.6 of the Swift tools. Any version of the toolchain can work with version 1 but you need >= 5.6 to work with version 2. See this forum conversation
https://forums.swift.org/t/using-swiftpm-5-6-and-supporting-older-versions/55708/9
As I said in my comment, it's probably best to ignore what's in that file and not commit it to your source code control. One of the comments in the above forum thread mentions that you might want to commit it to ensure repeatability of builds, but that is a fragile solution and if you want to build with exact versions, you should do this in the Package.swift file.
Addendum
You'll get mixed versions because, if resolving a package means no changes, spm will not overwrite the old Package.resolved.

Color theme totally messed up [duplicate]

This suddenly happened after I created a new file while working on a project. Almost all characters are simply white text (except for brackets, because I have bracket pair colorization enabled)
I already tried resetting my configurations, checked my configurations (both globally and in my workspace), and tried this extension that offers an alternative syntax highlighting (which worked, but I would prefer using the Visual Studio Code one).
I think this was caused by the extension called JavaScript and TypeScript Nightly. This was causing the syntax highlighting for .js and .ts files (.jsx and .tsx too). This was more of a bug with the latest version (currently 1.73.1).
You can disable the extension to enable the syntax highlighting.
This extension has now been updated and this issue is fixed.
What user Haneen said was correct, but instead of disabling it, you can install an old version that works just fine.
Click the cog on the bottom right → 'Install Another Version' → select an older version.
Cog at bottom right
Yes, this is exactly caused by the JavaScript and TypeScript Nightly extension.
You can disable or install another version (I recommend installing the prior version since the current version has a bug).
I am currently using the version which was released 2022-11-13.
The current version (v5.0.20221116) for JavaScript and TypeScript Nightly seems to be breaking the syntax highlighting. Downgrading to a previous version might resolve this issue.
This was resolved in v5.0.20221117 however.
Also, I deleted this JavaScript and TypeScript Nightly package, and now it works fine for me.
The module on the marketplace: JavaScript and TypeScript Nightly
I think this was caused by the extension called JavaScript and TypeScript Nightly. This was causing the syntax highlighting for .js and .ts files This was more of a bug with the latest version
As others mentioned, the two latest versions are causing issue for me, but 5.20221115 is working for me.
It was fixed with the latest update of JavaScript and TypeScript Nightly.

how to determine the current and future electron version(s) of vscode at extention build time

I'm collaborating on a vscode extension that uses a native module (#serialport) which needs to be included / pre-compiled for each platform/electron-version combination.
if we only include the current versions, it frequently breaks when vscode updates the electron version. some platforms can nativly re-compile , other can only after a (very) lengthy install of rather-complex toolchains that IMO should not be required for end-users.
So we want to include the relevant prebuilds,
and for that we need to look ahead in time ...
I'm looking for a reliable method to determine the electron versions used by vscode
- current version
- and the future (insider) version
- in addition it may be good to include a prior version to allow for backward compatibility
I have found that master/.yarnrc has the current ( or next imminent) version
today it is 4.2.7
vscode current release uses 4.2.5
prior versions can be read from the version history
master/.yarnrc
but what about the future / insider version ?
what is a good method/location to determine that programmatically ?, i.e. Which branch has the insiders version ?
Probable answer based on below hints and some more probing :
next version is in master ..microsoft/vscode/blob/.yarnrc
version 1.36.1 is in ..microsoft/vscode/blob/1.36.1/.yarnrc
version x.y.z is in ..microsoft/vscode/blob/x.y.z/.yarnrc
which only leaves the in-between versions/tags to be discovered.
intended approach:
during the build collect the relevant electron versions, ie "3.1.8","4.2.5","6.0.0-beta.0"
determine the ABI used by these versions using node-abi
var getAbi = require('node-abi').getAbi;getAbi('$version','electron')
use prebuild-install to download the relevant native prebuilds bindings, and include these as part of the extension
.\node_modules\.bin\prebuild-install.cmd --runtime electron --target $version --arch $arch --platform $platform --tag-prefix #serialport/bindings#
copy the bindings files for all ABI-arch-platform combinations to a folder, and inclide that in the vscode extension package
at load time , determine the ABI version of the running instance of vscode/electron, and dynamically load the module from the ABI/platform folder
alternative / additional approach:
- as a last ditch effort the code could try a just-in-time download of the pre-build binding file for the current platform, but this might run into permissions/malware scanner problems as that is essentially downloading downloading executable code from an external github repro.
current script code to download the bindings:
https://github.com/Josverl/pymakr-vsc/blob/fix/SerialMultiPlatform/scripts/mp-download.ps1
okay, so reverse logic then indicates that:
next version is in master https://raw.githubusercontent.com/microsoft/vscode/master/.yarnrc
version 1.36.1 is in https://raw.githubusercontent.com/microsoft/vscode/1.36.1/.yarnrc
version x.y.z is in https://raw.githubusercontent.com/microsoft/vscode/x.y.z/.yarnrc
which only leaves the in-between versions/tags to be discovered.

Where can I safely download older TYPO3 releases?

Back then, I was able to download older subversions of TYPO3 CMS on SourceForge which saved me a lot of time and anger.
Now I am facing a problem and I think it is a bug in the current used version. I would like to test it with an other instance, but as it seems it is not being stored anywhere. I will use an vulnerable version for now, but that is not what I actually want.
Maybe I've overseen a link or something. Do you know where I could find a list of all downloadable TYPO3 Versions? I know I can google it, but I don't want to use 3rd party sources ether...
I'd say that TYPO3 on SourceForge should still be updated...
All versions can be downloaded from get.typo3.org directly. Example for a very old 4.5:
wget --content-disposition https://get.typo3.org/4.5.38
You can use https://get.typo3.org/ for this. Simply append the version number to the URL to download the desired version, e.g. https://get.typo3.org/8.7.15 to download version 8.7.15 of TYPO3 (8.7.16 is the latest ATM.)
If you use Composer you can enforce a downgrade with something like this:
composer require typo3/cms 8.7.15
Or:
composer require typo3/cms-core:8.7.15 typo3/cms-backend:8.7.15 ...
Notice that this replaces the version constraint in your Composer manifest with a fixed version which should be changed back as soon as possible.

Cannot find latest version of highstock-all.js

I have used highstock-all.js having version - v4.1.10 (2015-12-07).
Now I want to upgrade it to latest version of v5.0.0 (2016-09-29) but could not find it anywhere in the downloads section http://code.highcharts.com/
Where can I find this? Is highstock-all.js a combination of highstock.js, highcharts-3d.js, highcharts-more.js? Will it work if I use combination of latest version of these files to get functionality of highstock-all.js?
P.S. It would be much better if I can get highstock-all.js latest version directly. Thank you.