Git Product home page Git Product logo

katsutedev / settings-repository Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 1.73 MB

Sync VSCode settings, extensions, keybindings, and more to a repository

Home Page: https://marketplace.visualstudio.com/items?itemName=katsute.settings-repository

License: GNU General Public License v2.0

TypeScript 96.33% JavaScript 3.67%
extension nodejs repository settings-sync sync-settings ts typescript visual-studio-code visual-studio-code-extension visual-studio-code-settings

settings-repository's People

Contributors

dependabot[bot] avatar imgbot[bot] avatar katsute avatar kdevbot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

settings-repository's Issues

Duplicate extension isn't removed on update

Operating System

Windows 10

VSCode Version

1.70.2

Extension Version

1.0.0

Issue

When an extension is updated the old one isn't removed until the second pull, causing extra unnecessary commits.

first commit

    {
        "identifier": "streetsidesoftware.code-spell-checker",
        "version": "2.5.4",
        "enabled": true
    },
++  {
++      "identifier": "streetsidesoftware.code-spell-checker",
++      "version": "2.6.0",
++      "enabled": true
++  },

second commit

--  {
--      "identifier": "streetsidesoftware.code-spell-checker",
--      "version": "2.5.4",
--      "enabled": true
--  },
    {
        "identifier": "streetsidesoftware.code-spell-checker",
        "version": "2.6.0",
        "enabled": true
    },

How to replicate

  1. Pull settings
  2. Extension updates
  3. Push settings
  4. Pull settings
  5. Push settings

Log

No response

Additional information

Seems to be caused by these lines:

const installed: string[] = fs.readdirSync(this.Extensions!, {withFileTypes: true})
.filter(f => f.isDirectory())
.map(f => f.name);

When an extension is updated the old folder doesn't get removed until closed, two versions exist during a push, causing the duplicate until the next push.

Should be resolved by always using the latest version, if someone is using a set version this change should be fine, since the extension wouldn't get updated.

Uninstalled extension reinstalled after push and vscode restart

Operating System

MacOS Sonoma

VSCode Version

Version: 1.88.0-insider (Universal)

Extension Version

v1.0.8

Issue

After uninstalling an extension, in this case ShipitSmarter.sops-edit, when we trigger manual push to a remote repo, this payload gets pushed:

{
        "identifier": "ShipitSmarter.sops-edit",
        "version": "1.0.0",
        "enabled": false
}

and upon restart, said extension is reinstalled, and a manual push to remote repo will send this:

{
        "identifier": "ShipitSmarter.sops-edit",
        "version": "1.0.0",
        "enabled": true
}

However, this is not correct. The extension should not be disabled to begin with, it should be uninstalled and the whole stanza should be completely deleted from extensions.json. Instead, it is only marked as "enabled": false.

This causes a major problem: if an extension is uninstalled in vscode but in a git commit pushed by Settings Repository it is marked only as disabled, it will be actually reinstalled by Settings Repository next time vscode is launched. This will make it installed and active: "enabled": true. This process will always bring back uninstalled extensions, resulting in endless circle of manual extension removal and automatic reinstallation after vscode restart.

N.B.: I am running vscode-insiders, could be a factor here.

How to replicate

Install extension
Push to Settings Repository remote repo
Close vscode
Start vscode
See uninstalled extension be automatically installed again (because it is only marked as "enabled": false)
Extension is installed again
Uninstall, repeat the whole process and see it installed again.

Log

No response

Additional information

Version: 1.88.0-insider (Universal)
Commit: 8c2b09c0443b94d75a73819ed35610f7e09375ae
Date: 2024-02-28T18:55:25.510Z (4 hrs ago)
Electron: 28.2.2
ElectronBuildId: 26836304
Chromium: 120.0.6099.276
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin x64 23.3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.