Skip to content

Commit

Permalink
prepare for deploy, fix dir + /
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute committed Dec 27, 2024
1 parent f6e7186 commit 7c663dd
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 7 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 3.1.0

### New Features

* Add env var `${vscode:user}` for `Code/User` directory [#436](https://github.com/KatsuteDev/Background/pull/436) ([@Katsute](https://github.com/Katsute))

On desktop this is the `Code/User` directory.

On portable this is the `data/user-data/User` directory.

### Dependencies

* Bump esbuild from 0.23.1 to 0.24.0 [#415](https://github.com/KatsuteDev/Background/pull/415) ([@dependabot](https://github.com/dependabot))
* Bump @types/node from 22.5.0 to 22.7.4 [#417](https://github.com/KatsuteDev/Background/pull/417) ([@dependabot](https://github.com/dependabot))
* Bump @vscode/vsce from 3.1.0 to 3.1.1 [#418](https://github.com/KatsuteDev/Background/pull/418) ([@dependabot](https://github.com/dependabot))
* Bump @types/vscode from 1.93.0 to 1.94.0 [#419](https://github.com/KatsuteDev/Background/pull/419) ([@dependabot](https://github.com/dependabot))
* Bump @vscode/vsce from 3.1.1 to 3.2.0 [#422](https://github.com/KatsuteDev/Background/pull/422) ([@dependabot](https://github.com/dependabot))
* Bump @types/node from 22.7.4 to 22.8.1 [#425](https://github.com/KatsuteDev/Background/pull/425) ([@dependabot](https://github.com/dependabot))
* Bump @vscode/vsce from 3.2.0 to 3.2.1 [#424](https://github.com/KatsuteDev/Background/pull/424) ([@dependabot](https://github.com/dependabot))
* Bump @types/vscode from 1.94.0 to 1.95.0 [#427](https://github.com/KatsuteDev/Background/pull/427) ([@dependabot](https://github.com/dependabot))
* Bump @types/node from 22.8.1 to 22.9.0 [#428](https://github.com/KatsuteDev/Background/pull/428) ([@dependabot](https://github.com/dependabot))
* Bump typescript from 5.6.3 to 5.7.2 [#430](https://github.com/KatsuteDev/Background/pull/430) ([@dependabot](https://github.com/dependabot))
* Bump @types/node from 22.9.0 to 22.10.1 [#431](https://github.com/KatsuteDev/Background/pull/431) ([@dependabot](https://github.com/dependabot))
* Bump @types/vscode from 1.95.0 to 1.96.0 [#434](https://github.com/KatsuteDev/Background/pull/434) ([@dependabot](https://github.com/dependabot))
* Bump esbuild from 0.24.0 to 0.24.2 [#437](https://github.com/KatsuteDev/Background/pull/437) ([@dependabot](https://github.com/dependabot))

**Full Changelog**: [`3.0.2...3.1.0`](https://github.com/KatsuteDev/Background/compare/3.0.2...3.1.0)

## 3.0.2

### Fixes
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ Use the <kbd>Background: Configuration</kbd> command or press the **Background**

## Environment Variables

If the path is not working, add an additional `/` after the variable.

|Variable|Description|
|:--|:--|
|`${vscode:workspace}`|Current VSCode project folder|
Expand Down
34 changes: 30 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
},
"homepage": "https://github.com/KatsuteDev/Background#readme",
"devDependencies": {
"@types/node": "22.10.1",
"@types/node": "22.10.2",
"@types/tmp": "0.2.6",
"@types/vscode": "1.96.0",
"@vscode/sudo-prompt": "9.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const activate: (context: ExtensionContext) => any = (context: ExtensionC

const dir = env.appRoot;

setUserDir(join(context.globalStorageUri.fsPath, "../../../")); // for env var
setUserDir(join(context.globalStorageUri.fsPath, "../../../User")); // for env var

// internal files
if(dir){
Expand Down
2 changes: 1 addition & 1 deletion src/extension/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const home: string = homedir();

export const setUserDir: (path: string) => void = (path: string) => {
if(!user){ // disallow reassignment
user = path;
user = path.replace(/\/$/, ''); // remove last slash
}
};

Expand Down

0 comments on commit 7c663dd

Please sign in to comment.