mirror of
https://github.com/jesse-r-s-hines/obsidian-open-tab-settings.git
synced 2026-07-22 05:43:41 +00:00
Update package configuration to not use type module
This commit is contained in:
parent
c189cde8a0
commit
dc61389de9
4 changed files with 11 additions and 11 deletions
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- name: Release
|
||||
run: |
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
|
||||
|
||||
if [ -e styles.css ]; then
|
||||
FILES="main.js manifest.json styles.css"
|
||||
else
|
||||
|
|
|
|||
8
.github/workflows/test.yaml
vendored
8
.github/workflows/test.yaml
vendored
|
|
@ -33,14 +33,14 @@ jobs:
|
|||
run: npm run test:unit
|
||||
|
||||
# Get key to use for the .obsidian-cache GitHub cache.
|
||||
# Run the wdio.conf.ts file directly, which logs the Obsidian versions to test, and use that
|
||||
# output as the cache key.
|
||||
# Run wdio.conf.mts directly, which will logs the Obsidian versions to test (see the
|
||||
# `if (process.env.CI)` bit in wdio.conf.mts). We'll use that output as the cache key.
|
||||
- id: get-cache-key
|
||||
name: "Get Obsidian cache key"
|
||||
shell: bash
|
||||
run: |
|
||||
npx tsx wdio.conf.ts > obsidian-versions-lock.txt
|
||||
# Delete the cache created by wdio.conf.ts so it doesn't conflict with restore
|
||||
npx tsx wdio.conf.mts > obsidian-versions-lock.txt
|
||||
# Delete the cache created by wdio.conf.mts so it doesn't conflict with restore
|
||||
rm -rf .obsidian-cache
|
||||
env:
|
||||
# Beta versions require authentication to download, so if you want to test beta versions,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
"version": "1.0.4",
|
||||
"description": "Add settings to open in new tab by default and prevent duplicate tabs.",
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||
|
|
@ -11,7 +10,7 @@
|
|||
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
||||
"test": "run-s test:*",
|
||||
"test:unit": "tsc --noEmit && mocha",
|
||||
"test:e2e": "npm run build && npx wdio run ./wdio.conf.ts"
|
||||
"test:e2e": "npm run build && npx wdio run ./wdio.conf.mts"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
|
|
|||
|
|
@ -11,20 +11,21 @@ if (process.env.OBSIDIAN_VERSIONS) {
|
|||
return [app, installer];
|
||||
})
|
||||
} else if (process.env.CI) {
|
||||
// Running in GitHub workflow.
|
||||
// You can use RUNNER_OS to select different versions on different platforms in the workflow matrix if you want
|
||||
// Running in GitHub CI. You can use RUNNER_OS to select different versions on different
|
||||
// platforms in the workflow matrix if you want
|
||||
versions = [["earliest", "earliest"], ["latest", "latest"]];
|
||||
if (await obsidianBetaAvailable(cacheDir)) {
|
||||
versions.push(["latest-beta", "latest"]);
|
||||
}
|
||||
|
||||
// Print the resolved Obsidian versions for use as the workflow cache key (see test_e2e.yaml)
|
||||
// Print the resolved Obsidian versions to use as the workflow cache key
|
||||
// (see .github/workflows/test.yaml)
|
||||
for (let [app, installer] of versions) {
|
||||
[app, installer] = await resolveObsidianVersions(app, installer, cacheDir);
|
||||
console.log(`${app}/${installer}`);
|
||||
}
|
||||
} else {
|
||||
versions = [["latest", "latest"], ["earliest", "earliest"]];
|
||||
versions = [["earliest", "earliest"], ["latest", "latest"]];
|
||||
}
|
||||
|
||||
export const config: WebdriverIO.Config = {
|
||||
Loading…
Reference in a new issue