Skip to content

Commit

Permalink
Fix launch bug (#69)
Browse files Browse the repository at this point in the history
* Better logging of detecting openscad executable

* Log extension name and version in output

* Add skipLaunchPathValidation config

* Bump webpack version

* Fix webpack package.json import using require()

* Resolve symlinks for openscad path

* Update Node, pnpm, and action versions in workflows

* Add try/catch to getOpenscadVersion()

* Improve logging in Preview constructor

* Fix uncaught exception with non-existant realpath

* Use cwd when calling openscad (fixes #68)

* Better logging in preview.ts

* Fix typos in changelog

* Bump github actions step versions

* docs: For 1.3.2

* bump version 1.3.2
  • Loading branch information
Antyos authored Jan 30, 2025
1 parent f665847 commit e0b35d7
Show file tree
Hide file tree
Showing 12 changed files with 3,812 additions and 2,906 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Build and deploy Extension
on: [push, pull_request]

env:
NODE_VERSION: '18.x'
NODE_VERSION: '20.x'

jobs:
build:
Expand All @@ -14,17 +14,17 @@ jobs:
vsixName: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand All @@ -34,7 +34,7 @@ jobs:
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down Expand Up @@ -64,14 +64,14 @@ jobs:

- name: Package extension .vsix
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1.3.0
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
dependencies: false

- name: Upload extension artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: openscad-vsix
path: ${{ steps.packageExtension.outputs.vsixPath }}
Expand All @@ -81,7 +81,7 @@ jobs:
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download artifact
id: download
Expand Down
28 changes: 24 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
# Changelog

## [Unreleased]
## [[1.3.2](https://github.com/Antyos/vscode-openscad/releases/tag/v1.3.2)] - (2025-01-30)

## [[1.3.1](htts://github.com/Antyos/vscode-openscad/releases/tag/v1.3.1)] - (2024-02-01)
### Added

- `openscad.experimental.skipLaunchPathValidation` configuration. (Not an ideal
approach, but it should work.)
- Better logging.

### Fixed

- Errors when validating OpenSCAD executable. (See PR
[#69](https://github.com/Antyos/vscode-openscad/pull/69)).
- Executable path not considered valid if `openscad --version` does not
output to `stdout` (See
[#62](https://github.com/Antyos/vscode-openscad/issues/62)).
- Enable `openscad.experimental.skipLaunchPathValidation` to bypass the
check `openscad --version` check.
- Simlink to OpenSCAD executable or VS Code itself not resolving correctly.
(See [#68](https://github.com/Antyos/vscode-openscad/issues/68)).

## [[1.3.1](https://github.com/Antyos/vscode-openscad/releases/tag/v1.3.1)] - (2024-02-01)

### Fixed

Expand All @@ -16,6 +34,7 @@
### Changed

- Configurations (See PR [#58](https://github.com/Antyos/vscode-openscad/pull/58))

| Old | New |
| --- | --- |
| `openscad.export.autoNamingFormat` | `openscad.export.exportNameFormat` |
Expand All @@ -24,7 +43,8 @@

### Added

- Override `openscad.export.exportNameFormat` on a per-file basis. (See [#58](https://github.com/Antyos/vscode-openscad/pull/58))
- Override `openscad.export.exportNameFormat` on a per-file basis. (See PR
[#58](https://github.com/Antyos/vscode-openscad/pull/58)).
- `openscad.export.exportNameFormat` now supports date time variables. Use `${date}`
for an ISO 8601 date string or use a custom format with: `${date:TEMPLATE}`
according to [Luxon tokens](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
Expand All @@ -34,7 +54,7 @@
### Fixed

- Auto versioning started at "-Infinity" instead of "1" for a folder without
siimilarly named files.
similarly named files.

### Deprecated

Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "openscad",
"displayName": "OpenSCAD",
"description": "OpenSCAD highlighting, snippets, and more for VSCode!",
"version": "1.3.1",
"version": "1.3.2",
"publisher": "Antyos",
"icon": "media/logo.png",
"license": "SEE LICENSE IN LICENSE.txt",
Expand Down Expand Up @@ -230,6 +230,12 @@
"type": "string"
}
},
"openscad.experimental.skipLaunchPathValidation": {
"type": "boolean",
"default": false,
"markdownDescription": "*WARNING: Do not enable this unles you know what you are doing.*\n\nSkip validation of the `openscad.launchPath` setting. Use this if you are sure the path is correct but it is not being accepted. This may occur if you are using a openscad executable which does not output a version when calling `openscad --version`.",
"scope": "machine-overridable"
},
"openscad.maxInstances": {
"type": "number",
"default": 0,
Expand Down Expand Up @@ -438,8 +444,8 @@
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"util": "^0.12.5",
"webpack": "^5.76.2",
"webpack-cli": "^4.10.0"
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"command-exists": "^1.2.9",
Expand Down
Loading

0 comments on commit e0b35d7

Please sign in to comment.