From 9be8d63278cf0a2b097c7289117d2d042ad294b5 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:16:01 +0200 Subject: [PATCH 01/26] test --- .github/workflows/on-push.yml | 12 ++++++++---- .gitignore | 2 ++ lean4-infoview/package.json | 4 ++-- lean4-infoview/publish.sh | 22 ++++++++++++++++++++++ package-lock.json | 29 ++++++++++++++++++++++------- 5 files changed, 56 insertions(+), 13 deletions(-) create mode 100755 lean4-infoview/publish.sh diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index d9725e5c4..2dc96ad55 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -43,6 +43,10 @@ jobs: npm ci npm run build + - name: Publish infoview + run | + ./lean4-infoview/publish.sh + - name: Package run: npm run package --workspace=lean4 if: ${{ !startsWith(github.ref, 'refs/tags/v') || !endsWith(github.ref, '-pre') }} @@ -107,7 +111,7 @@ jobs: run: | echo "$HOME\.elan\bin" >> $env:GITHUB_PATH - - name: Run tests - uses: GabrielBB/xvfb-action@v1.0 - with: - run: npm run test + # - name: Run tests + # uses: GabrielBB/xvfb-action@v1.0 + # with: + # run: npm run test diff --git a/.gitignore b/.gitignore index 3a915089c..f3313a3a5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ dist/ .vscode-test/ build/ +**/.npmrc + ## Output node_modules/ *.tsbuildinfo diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 55b9fb958..98e6fc1c1 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,6 +1,6 @@ { - "name": "@leanprover/infoview", - "version": "0.7.0", + "name": "@joneugster/infoview", + "version": "0.8.1", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { "watch": "rollup --config --environment NODE_ENV:development --watch", diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh new file mode 100755 index 000000000..376710cf5 --- /dev/null +++ b/lean4-infoview/publish.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# This script automatically increases the minor version of the infoview package +# and publishes the new version to https://npmjs.com. + +# Operate in the directory where this file is located +cd $(dirname $0) + +FILE="./package.json" + +# # update package version +# current_version=$(sed -n 's/.*"version": "\([^"]*\)".*/\1/p' "$FILE"); +# new_version=$(echo $current_version | awk -F '.' '{$NF = $NF + 1} 1' OFS='.'); +# echo "updating version to $new_version." +# sed -i 's/"version": ".*"/"version": "'$new_version'"/' "$FILE" +# sed -i 's,"current-release": ".*","current-release": "npm:@joneugster/infoview@^'$new_version'",' "$FILE" + +echo _auth=$NPM_PUBLSH_TOKEN >> .npmrc +echo email=$NPM_PUBLISH_EMAIL >> .npmrc +echo always-auth=true >> .npmrc + +npm publish --access=public \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 91fd5d4be..3611ec9e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,8 +25,8 @@ } }, "lean4-infoview": { - "name": "@leanprover/infoview", - "version": "0.7.0", + "name": "@joneugster/infoview", + "version": "0.8.0", "license": "Apache-2.0", "dependencies": { "@leanprover/infoview-api": "~0.4.0", @@ -463,6 +463,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@joneugster/infoview": { + "resolved": "lean4-infoview", + "link": true + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -521,10 +525,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@leanprover/infoview": { - "resolved": "lean4-infoview", - "link": true - }, "node_modules/@leanprover/infoview-api": { "resolved": "lean4-infoview-api", "link": true @@ -13470,7 +13470,7 @@ }, "vscode-lean4": { "name": "lean4", - "version": "0.0.151", + "version": "0.0.155", "license": "Apache-2.0", "dependencies": { "@leanprover/infoview": "~0.7.0", @@ -13510,6 +13510,21 @@ "vscode": "^1.75.0" } }, + "vscode-lean4/node_modules/@leanprover/infoview": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.7.0.tgz", + "integrity": "sha512-6Ke8MWU/EyGOX/vBguhK7zCtmCILWkYtr15qmS6JvR8AvIl2z9Dj2NhwsAVAv42ia326RRU09IWvx7uwT5Ahqw==", + "dependencies": { + "@leanprover/infoview-api": "~0.4.0", + "@vscode/codicons": "^0.0.32", + "@vscode/webview-ui-toolkit": "^1.4.0", + "es-module-shims": "^1.7.3", + "marked": "^4.3.0", + "react-fast-compare": "^3.2.2", + "tachyons": "^4.12.0", + "vscode-languageserver-protocol": "^3.17.3" + } + }, "vscode-lean4/node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", From 0c9d7eb1751809dd8100cd285bbc9927c1ffa4e1 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:16:37 +0200 Subject: [PATCH 02/26] typo --- .github/workflows/on-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 2dc96ad55..2bbdb89cc 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -44,9 +44,9 @@ jobs: npm run build - name: Publish infoview - run | + run: | ./lean4-infoview/publish.sh - + - name: Package run: npm run package --workspace=lean4 if: ${{ !startsWith(github.ref, 'refs/tags/v') || !endsWith(github.ref, '-pre') }} From 0293ef6a80b53773b9625fad6462c15010e5591a Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:21:40 +0200 Subject: [PATCH 03/26] fix access rights --- .github/workflows/on-push.yml | 2 ++ lean4-infoview/publish.sh | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 2bbdb89cc..a7db40957 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -44,6 +44,8 @@ jobs: npm run build - name: Publish infoview + if: ${{ matrix.os == 'ubuntu-latest' }} + continue-on-error: false run: | ./lean4-infoview/publish.sh diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh index 376710cf5..6aaee188d 100755 --- a/lean4-infoview/publish.sh +++ b/lean4-infoview/publish.sh @@ -15,8 +15,7 @@ FILE="./package.json" # sed -i 's/"version": ".*"/"version": "'$new_version'"/' "$FILE" # sed -i 's,"current-release": ".*","current-release": "npm:@joneugster/infoview@^'$new_version'",' "$FILE" -echo _auth=$NPM_PUBLSH_TOKEN >> .npmrc -echo email=$NPM_PUBLISH_EMAIL >> .npmrc -echo always-auth=true >> .npmrc + +echo "//registry.npmjs.org/:_authToken=${NPM_PUBLSH_TOKEN}" >> .npmrc npm publish --access=public \ No newline at end of file From f8b25dd937a63e79c900c80cd459fad4d5e885b8 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:25:14 +0200 Subject: [PATCH 04/26] fix access rights --- .github/workflows/on-push.yml | 6 +++--- lean4-infoview/publish.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index a7db40957..3080f3357 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -22,9 +22,9 @@ jobs: # - name: macOS # os: macos-latest # artifact: build-macOS - - name: Windows - os: windows-latest - artifact: build-Windows + # - name: Windows + # os: windows-latest + # artifact: build-Windows name: ${{ matrix.name }} runs-on: ${{ matrix.os }} diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh index 6aaee188d..cf47ee675 100755 --- a/lean4-infoview/publish.sh +++ b/lean4-infoview/publish.sh @@ -16,6 +16,6 @@ FILE="./package.json" # sed -i 's,"current-release": ".*","current-release": "npm:@joneugster/infoview@^'$new_version'",' "$FILE" -echo "//registry.npmjs.org/:_authToken=${NPM_PUBLSH_TOKEN}" >> .npmrc +echo "//registry.npmjs.org/:_authToken=${NPM_PUBLISH_TOKEN}" >> .npmrc npm publish --access=public \ No newline at end of file From 4b14d2814e1eda61276b5a4ca587acd27cd9e61c Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:34:14 +0200 Subject: [PATCH 05/26] test --- .github/workflows/on-push.yml | 3 +++ lean4-infoview/publish.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 3080f3357..c2e9f5be9 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -117,3 +117,6 @@ jobs: # uses: GabrielBB/xvfb-action@v1.0 # with: # run: npm run test + + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh index cf47ee675..77d4d7d94 100755 --- a/lean4-infoview/publish.sh +++ b/lean4-infoview/publish.sh @@ -18,4 +18,7 @@ FILE="./package.json" echo "//registry.npmjs.org/:_authToken=${NPM_PUBLISH_TOKEN}" >> .npmrc +cat .npmrc +npm run build + npm publish --access=public \ No newline at end of file From 215808e93e09b508df62254945187550bcb5b277 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:38:22 +0200 Subject: [PATCH 06/26] test --- lean4-infoview/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh index 77d4d7d94..b0bbd04b1 100755 --- a/lean4-infoview/publish.sh +++ b/lean4-infoview/publish.sh @@ -16,7 +16,7 @@ FILE="./package.json" # sed -i 's,"current-release": ".*","current-release": "npm:@joneugster/infoview@^'$new_version'",' "$FILE" -echo "//registry.npmjs.org/:_authToken=${NPM_PUBLISH_TOKEN}" >> .npmrc +echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ../.npmrc cat .npmrc npm run build From 0abdb43756712f400c807bb5ca7423208f116e72 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:38:43 +0200 Subject: [PATCH 07/26] test --- lean4-infoview/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh index b0bbd04b1..6e3b04b62 100755 --- a/lean4-infoview/publish.sh +++ b/lean4-infoview/publish.sh @@ -18,7 +18,7 @@ FILE="./package.json" echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ../.npmrc +echo "hey there" cat .npmrc -npm run build npm publish --access=public \ No newline at end of file From 3ca931b7dc2393bcdbf73276fc390bc0798c6173 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:42:59 +0200 Subject: [PATCH 08/26] first test after its working --- .github/workflows/on-push.yml | 2 +- lean4-infoview/publish.sh | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100755 lean4-infoview/publish.sh diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index c2e9f5be9..5c1586308 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -47,7 +47,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: false run: | - ./lean4-infoview/publish.sh + (cd lean4-infoview && npm publish --access=public) - name: Package run: npm run package --workspace=lean4 diff --git a/lean4-infoview/publish.sh b/lean4-infoview/publish.sh deleted file mode 100755 index 6e3b04b62..000000000 --- a/lean4-infoview/publish.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# This script automatically increases the minor version of the infoview package -# and publishes the new version to https://npmjs.com. - -# Operate in the directory where this file is located -cd $(dirname $0) - -FILE="./package.json" - -# # update package version -# current_version=$(sed -n 's/.*"version": "\([^"]*\)".*/\1/p' "$FILE"); -# new_version=$(echo $current_version | awk -F '.' '{$NF = $NF + 1} 1' OFS='.'); -# echo "updating version to $new_version." -# sed -i 's/"version": ".*"/"version": "'$new_version'"/' "$FILE" -# sed -i 's,"current-release": ".*","current-release": "npm:@joneugster/infoview@^'$new_version'",' "$FILE" - - -echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ../.npmrc - -echo "hey there" -cat .npmrc - -npm publish --access=public \ No newline at end of file From b5d8adf57b49a1bb01e2e7ffd60d3cdf62bd80de Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:43:18 +0200 Subject: [PATCH 09/26] bump version --- lean4-infoview/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 98e6fc1c1..1df33a1af 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,6 +1,6 @@ { "name": "@joneugster/infoview", - "version": "0.8.1", + "version": "0.8.2", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { "watch": "rollup --config --environment NODE_ENV:development --watch", From 5505cceb55bdf6deea574270da42319ee821c6b4 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:46:17 +0200 Subject: [PATCH 10/26] add npmrc --- .gitignore | 2 -- .npmrc | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 .npmrc diff --git a/.gitignore b/.gitignore index f3313a3a5..3a915089c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,6 @@ dist/ .vscode-test/ build/ -**/.npmrc - ## Output node_modules/ *.tsbuildinfo diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..bd3327ab5 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} \ No newline at end of file From 08f5b85b753822dc3b89683d43d4916fab284e87 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:48:19 +0200 Subject: [PATCH 11/26] test --- .github/workflows/on-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 5c1586308..91a3ba138 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -45,7 +45,7 @@ jobs: - name: Publish infoview if: ${{ matrix.os == 'ubuntu-latest' }} - continue-on-error: false + continue-on-error: true run: | (cd lean4-infoview && npm publish --access=public) From 56c6bdedae13a2f292642bc1627b8ea141b98037 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:49:40 +0200 Subject: [PATCH 12/26] test for api --- .github/workflows/on-push.yml | 6 ++++++ lean4-infoview-api/package.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 91a3ba138..a8ded3b50 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -43,6 +43,12 @@ jobs: npm ci npm run build + - name: Publish infoview-api + if: ${{ matrix.os == 'ubuntu-latest' }} + continue-on-error: true + run: | + (cd lean4-infoview-api && npm publish --access=public) + - name: Publish infoview if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: true diff --git a/lean4-infoview-api/package.json b/lean4-infoview-api/package.json index 87984dd7a..fde354c30 100644 --- a/lean4-infoview-api/package.json +++ b/lean4-infoview-api/package.json @@ -1,6 +1,6 @@ { - "name": "@leanprover/infoview-api", - "version": "0.4.0", + "name": "@joneugster/infoview-api", + "version": "0.4.3", "description": "Types and API for @leanprover/infoview.", "scripts": { "watch": "tsc --watch", From cab7c4e0bae5865636d25636ba66d0093491a18d Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 16:53:49 +0200 Subject: [PATCH 13/26] test --- lean4-infoview/package.json | 2 +- package-lock.json | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 1df33a1af..b898bd408 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -47,7 +47,7 @@ "typescript": "^5.4.5" }, "dependencies": { - "@leanprover/infoview-api": "~0.4.0", + "@joneugster/infoview-api": "~0.4.3", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", diff --git a/package-lock.json b/package-lock.json index 3611ec9e7..dc898f072 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,10 +26,10 @@ }, "lean4-infoview": { "name": "@joneugster/infoview", - "version": "0.8.0", + "version": "0.8.2", "license": "Apache-2.0", "dependencies": { - "@leanprover/infoview-api": "~0.4.0", + "@joneugster/infoview-api": "~0.4.3", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", @@ -58,8 +58,8 @@ } }, "lean4-infoview-api": { - "name": "@leanprover/infoview-api", - "version": "0.4.0", + "name": "@joneugster/infoview-api", + "version": "0.4.3", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.4.5", @@ -467,6 +467,10 @@ "resolved": "lean4-infoview", "link": true }, + "node_modules/@joneugster/infoview-api": { + "resolved": "lean4-infoview-api", + "link": true + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", From 54faeb2967a1f394c96e89873f4ff26620bd3f36 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 17:22:45 +0200 Subject: [PATCH 14/26] api test --- lean4-infoview-api/package.json | 2 +- lean4-infoview/package.json | 4 ++-- package-lock.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lean4-infoview-api/package.json b/lean4-infoview-api/package.json index fde354c30..87a8d0c37 100644 --- a/lean4-infoview-api/package.json +++ b/lean4-infoview-api/package.json @@ -1,6 +1,6 @@ { "name": "@joneugster/infoview-api", - "version": "0.4.3", + "version": "0.4.4", "description": "Types and API for @leanprover/infoview.", "scripts": { "watch": "tsc --watch", diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index b898bd408..f9ee3ff7f 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,6 +1,6 @@ { "name": "@joneugster/infoview", - "version": "0.8.2", + "version": "0.8.3", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { "watch": "rollup --config --environment NODE_ENV:development --watch", @@ -47,7 +47,7 @@ "typescript": "^5.4.5" }, "dependencies": { - "@joneugster/infoview-api": "~0.4.3", + "@leanprover/infoview-api": "~0.4.3", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", diff --git a/package-lock.json b/package-lock.json index dc898f072..abb5a4505 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "version": "0.8.2", "license": "Apache-2.0", "dependencies": { - "@joneugster/infoview-api": "~0.4.3", + "@leanprover/infoview-api": "~0.4.3", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", From cb26800f2568e17e74fdc720221aa3692c1ed53a Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 17:27:35 +0200 Subject: [PATCH 15/26] undo test modifications --- lean4-infoview-api/package.json | 2 +- lean4-infoview/package.json | 2 +- package-lock.json | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lean4-infoview-api/package.json b/lean4-infoview-api/package.json index 87a8d0c37..c2234a02c 100644 --- a/lean4-infoview-api/package.json +++ b/lean4-infoview-api/package.json @@ -1,5 +1,5 @@ { - "name": "@joneugster/infoview-api", + "name": "@leanprover/infoview-api", "version": "0.4.4", "description": "Types and API for @leanprover/infoview.", "scripts": { diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index f9ee3ff7f..7650a645d 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,5 +1,5 @@ { - "name": "@joneugster/infoview", + "name": "@leanprover/infoview", "version": "0.8.3", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { diff --git a/package-lock.json b/package-lock.json index abb5a4505..1e98b8300 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ } }, "lean4-infoview": { - "name": "@joneugster/infoview", + "name": "@leanprover/infoview", "version": "0.8.2", "license": "Apache-2.0", "dependencies": { @@ -58,7 +58,7 @@ } }, "lean4-infoview-api": { - "name": "@joneugster/infoview-api", + "name": "@leanprover/infoview-api", "version": "0.4.3", "license": "Apache-2.0", "devDependencies": { @@ -463,11 +463,11 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@joneugster/infoview": { + "node_modules/@leanprover/infoview": { "resolved": "lean4-infoview", "link": true }, - "node_modules/@joneugster/infoview-api": { + "node_modules/@leanprover/infoview-api": { "resolved": "lean4-infoview-api", "link": true }, From bc94356cd2824f8c0f3402a2f919d18f4fa4feb4 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 17:32:28 +0200 Subject: [PATCH 16/26] cleanup --- .github/workflows/on-push.yml | 14 +++++++------- lean4-infoview-api/package.json | 2 +- lean4-infoview/package.json | 4 ++-- package-lock.json | 18 +++++++----------- 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index a8ded3b50..5db4fe462 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -22,9 +22,9 @@ jobs: # - name: macOS # os: macos-latest # artifact: build-macOS - # - name: Windows - # os: windows-latest - # artifact: build-Windows + - name: Windows + os: windows-latest + artifact: build-Windows name: ${{ matrix.name }} runs-on: ${{ matrix.os }} @@ -119,10 +119,10 @@ jobs: run: | echo "$HOME\.elan\bin" >> $env:GITHUB_PATH - # - name: Run tests - # uses: GabrielBB/xvfb-action@v1.0 - # with: - # run: npm run test + - name: Run tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: npm run test env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/lean4-infoview-api/package.json b/lean4-infoview-api/package.json index c2234a02c..87984dd7a 100644 --- a/lean4-infoview-api/package.json +++ b/lean4-infoview-api/package.json @@ -1,6 +1,6 @@ { "name": "@leanprover/infoview-api", - "version": "0.4.4", + "version": "0.4.0", "description": "Types and API for @leanprover/infoview.", "scripts": { "watch": "tsc --watch", diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 7650a645d..55b9fb958 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,6 +1,6 @@ { "name": "@leanprover/infoview", - "version": "0.8.3", + "version": "0.7.0", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { "watch": "rollup --config --environment NODE_ENV:development --watch", @@ -47,7 +47,7 @@ "typescript": "^5.4.5" }, "dependencies": { - "@leanprover/infoview-api": "~0.4.3", + "@leanprover/infoview-api": "~0.4.0", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", diff --git a/package-lock.json b/package-lock.json index 1e98b8300..95ec4ad27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,10 +26,10 @@ }, "lean4-infoview": { "name": "@leanprover/infoview", - "version": "0.8.2", + "version": "0.7.0", "license": "Apache-2.0", "dependencies": { - "@leanprover/infoview-api": "~0.4.3", + "@leanprover/infoview-api": "~0.4.0", "@vscode/codicons": "^0.0.32", "@vscode/webview-ui-toolkit": "^1.4.0", "es-module-shims": "^1.7.3", @@ -59,7 +59,7 @@ }, "lean4-infoview-api": { "name": "@leanprover/infoview-api", - "version": "0.4.3", + "version": "0.4.0", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.4.5", @@ -463,14 +463,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@leanprover/infoview": { - "resolved": "lean4-infoview", - "link": true - }, - "node_modules/@leanprover/infoview-api": { - "resolved": "lean4-infoview-api", - "link": true - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -529,6 +521,10 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@leanprover/infoview": { + "resolved": "lean4-infoview", + "link": true + }, "node_modules/@leanprover/infoview-api": { "resolved": "lean4-infoview-api", "link": true From 367fb4b979a67f4662b2f27a601e807639a23913 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Mon, 27 May 2024 17:33:06 +0200 Subject: [PATCH 17/26] cleanup --- .npmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmrc b/.npmrc index bd3327ab5..ae643592e 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -//registry.npmjs.org/:_authToken=${NPM_TOKEN} \ No newline at end of file +//registry.npmjs.org/:_authToken=${NPM_TOKEN} From bd2978dc521afa741c4ff91de94f2a2cb01116aa Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 11:12:16 +0200 Subject: [PATCH 18/26] use @latest --- .github/workflows/on-push.yml | 4 ++-- lean4-infoview/package.json | 2 +- package-lock.json | 4 ++-- prerelease.sh | 1 + vscode-lean4/package.json | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 5db4fe462..52f86f4cf 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -47,13 +47,13 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - (cd lean4-infoview-api && npm publish --access=public) + npm publish --workspace=lean4-infoview-api --access=public - name: Publish infoview if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - (cd lean4-infoview && npm publish --access=public) + npm publish --workspace=lean4-infoview --access=public - name: Package run: npm run package --workspace=lean4 diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 55b9fb958..1063bdcff 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -39,7 +39,7 @@ "@types/marked": "^4.3.1", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", - "current-release": "npm:@leanprover/infoview@^0.7.0", + "current-release": "npm:@leanprover/infoview@latest", "react": "^18.2.0", "react-dom": "^18.2.0", "rollup": "^3.26.2", diff --git a/package-lock.json b/package-lock.json index 95ec4ad27..95ba41cd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "@types/marked": "^4.3.1", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", - "current-release": "npm:@leanprover/infoview@^0.7.0", + "current-release": "npm:@leanprover/infoview@latest", "react": "^18.2.0", "react-dom": "^18.2.0", "rollup": "^3.26.2", @@ -13470,7 +13470,7 @@ }, "vscode-lean4": { "name": "lean4", - "version": "0.0.155", + "version": "0.0.156", "license": "Apache-2.0", "dependencies": { "@leanprover/infoview": "~0.7.0", diff --git a/prerelease.sh b/prerelease.sh index 38e994444..84f9a2b21 100755 --- a/prerelease.sh +++ b/prerelease.sh @@ -1,4 +1,5 @@ #!/bin/sh + if [ $# != 1 ]; then echo Usage: ./prerelease.sh 1.2.3 exit 1 diff --git a/vscode-lean4/package.json b/vscode-lean4/package.json index cbd5de806..2888709c8 100644 --- a/vscode-lean4/package.json +++ b/vscode-lean4/package.json @@ -2,7 +2,7 @@ "name": "lean4", "displayName": "lean4", "description": "Lean 4 language support for VS Code", - "version": "0.0.155", + "version": "0.0.156", "publisher": "leanprover", "engines": { "vscode": "^1.75.0" From 7e8a7400b8b6219a05e8668dab5d40ce469399f7 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 11:13:35 +0200 Subject: [PATCH 19/26] fix --- package-lock.json | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95ba41cd9..1c226d643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13510,21 +13510,6 @@ "vscode": "^1.75.0" } }, - "vscode-lean4/node_modules/@leanprover/infoview": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.7.0.tgz", - "integrity": "sha512-6Ke8MWU/EyGOX/vBguhK7zCtmCILWkYtr15qmS6JvR8AvIl2z9Dj2NhwsAVAv42ia326RRU09IWvx7uwT5Ahqw==", - "dependencies": { - "@leanprover/infoview-api": "~0.4.0", - "@vscode/codicons": "^0.0.32", - "@vscode/webview-ui-toolkit": "^1.4.0", - "es-module-shims": "^1.7.3", - "marked": "^4.3.0", - "react-fast-compare": "^3.2.2", - "tachyons": "^4.12.0", - "vscode-languageserver-protocol": "^3.17.3" - } - }, "vscode-lean4/node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", From 32576492a8410daa3cc3fe26f0aab586e5eaa165 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 11:40:03 +0200 Subject: [PATCH 20/26] testing automated publishing logic --- .github/workflows/on-push.yml | 8 ++++++-- lean4-infoview/package.json | 2 +- package-lock.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 52f86f4cf..40c4d7560 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -50,10 +50,14 @@ jobs: npm publish --workspace=lean4-infoview-api --access=public - name: Publish infoview - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ (matrix.os == 'ubuntu-latest') && "$(npm view @leanprover/infoview version)" != "$(node -p -e "require('./lean4-infoview/package.json').version")" }} continue-on-error: true run: | - npm publish --workspace=lean4-infoview --access=public + echo "Would publish!" + # PUB_VERSION=$(npm view @leanprover/infoview version) + # NEW_VERSION=$(node -p -e "require('./lean4-infoview/package.json').version") + + # npm publish --workspace=lean4-infoview --access=public - name: Package run: npm run package --workspace=lean4 diff --git a/lean4-infoview/package.json b/lean4-infoview/package.json index 1063bdcff..20f9e5a97 100644 --- a/lean4-infoview/package.json +++ b/lean4-infoview/package.json @@ -1,6 +1,6 @@ { "name": "@leanprover/infoview", - "version": "0.7.0", + "version": "0.7.1", "description": "An interactive display for the Lean 4 theorem prover.", "scripts": { "watch": "rollup --config --environment NODE_ENV:development --watch", diff --git a/package-lock.json b/package-lock.json index 1c226d643..913745d79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ }, "lean4-infoview": { "name": "@leanprover/infoview", - "version": "0.7.0", + "version": "0.7.1", "license": "Apache-2.0", "dependencies": { "@leanprover/infoview-api": "~0.4.0", From 6dd64b8163f16a9e17a1914b3138ac8ca07f069c Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 11:54:30 +0200 Subject: [PATCH 21/26] fix --- .github/workflows/on-push.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 40c4d7560..6d45eea9f 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -50,10 +50,13 @@ jobs: npm publish --workspace=lean4-infoview-api --access=public - name: Publish infoview - if: ${{ (matrix.os == 'ubuntu-latest') && "$(npm view @leanprover/infoview version)" != "$(node -p -e "require('./lean4-infoview/package.json').version")" }} + if: ${{ (matrix.os == 'ubuntu-latest') }} continue-on-error: true run: | - echo "Would publish!" + [ "$(npm view @leanprover/infoview version)" != "$(node -p -e 'require("./lean4-infoview/package.json").version')" ] && echo "Would publish!" # PUB_VERSION=$(npm view @leanprover/infoview version) + # NEW_VERSION=$(node -p -e "require('./lean4-infoview/package.json').version") + + # npm publish --workspace=lean4-infoview --access=public # PUB_VERSION=$(npm view @leanprover/infoview version) # NEW_VERSION=$(node -p -e "require('./lean4-infoview/package.json').version") From c87f6acadd9ecdc214dbab02d89ee596fdc84fb5 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 11:58:39 +0200 Subject: [PATCH 22/26] cleanup --- .github/workflows/on-push.yml | 15 ++++----------- prerelease.sh | 1 - vscode-lean4/package.json | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 6d45eea9f..cc1a8b3fd 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -43,24 +43,17 @@ jobs: npm ci npm run build - - name: Publish infoview-api + - name: Publish infoview-api (if new version) if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - npm publish --workspace=lean4-infoview-api --access=public + [ "$(npm view @leanprover/infoview-api version)" != "$(node -p -e 'require("./lean4-infoview-api/package.json").version')" ] && npm publish --workspace=lean4-infoview-api --access=public - - name: Publish infoview + - name: Publish infoview (if new version) if: ${{ (matrix.os == 'ubuntu-latest') }} continue-on-error: true run: | - [ "$(npm view @leanprover/infoview version)" != "$(node -p -e 'require("./lean4-infoview/package.json").version')" ] && echo "Would publish!" # PUB_VERSION=$(npm view @leanprover/infoview version) - # NEW_VERSION=$(node -p -e "require('./lean4-infoview/package.json').version") - - # npm publish --workspace=lean4-infoview --access=public - # PUB_VERSION=$(npm view @leanprover/infoview version) - # NEW_VERSION=$(node -p -e "require('./lean4-infoview/package.json').version") - - # npm publish --workspace=lean4-infoview --access=public + [ "$(npm view @leanprover/infoview version)" != "$(node -p -e 'require("./lean4-infoview/package.json").version')" ] && npm publish --workspace=lean4-infoview --access=public - name: Package run: npm run package --workspace=lean4 diff --git a/prerelease.sh b/prerelease.sh index 84f9a2b21..38e994444 100755 --- a/prerelease.sh +++ b/prerelease.sh @@ -1,5 +1,4 @@ #!/bin/sh - if [ $# != 1 ]; then echo Usage: ./prerelease.sh 1.2.3 exit 1 diff --git a/vscode-lean4/package.json b/vscode-lean4/package.json index 2888709c8..cbd5de806 100644 --- a/vscode-lean4/package.json +++ b/vscode-lean4/package.json @@ -2,7 +2,7 @@ "name": "lean4", "displayName": "lean4", "description": "Lean 4 language support for VS Code", - "version": "0.0.156", + "version": "0.0.155", "publisher": "leanprover", "engines": { "vscode": "^1.75.0" From 14b6d0649d7ff25a0ee2e3d54fa14b6f79b180c7 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 12:00:04 +0200 Subject: [PATCH 23/26] npm ci --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 913745d79..7cd76521e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13470,7 +13470,7 @@ }, "vscode-lean4": { "name": "lean4", - "version": "0.0.156", + "version": "0.0.155", "license": "Apache-2.0", "dependencies": { "@leanprover/infoview": "~0.7.0", From d8db183b0a8bd5a44546794e21d497f7f7c4b373 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 12:15:54 +0200 Subject: [PATCH 24/26] refine script --- .github/workflows/on-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index cc1a8b3fd..80d28ffd4 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -47,13 +47,13 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - [ "$(npm view @leanprover/infoview-api version)" != "$(node -p -e 'require("./lean4-infoview-api/package.json").version')" ] && npm publish --workspace=lean4-infoview-api --access=public + [ "$(npm view @leanprover/infoview-api version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview-api/package.json)" ] && (npm publish --workspace=lean4-infoview-api --access=public) || (echo "infoview-api version unchanged") - name: Publish infoview (if new version) if: ${{ (matrix.os == 'ubuntu-latest') }} continue-on-error: true run: | - [ "$(npm view @leanprover/infoview version)" != "$(node -p -e 'require("./lean4-infoview/package.json").version')" ] && npm publish --workspace=lean4-infoview --access=public + [ "$(npm view @leanprover/infoview version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview/package.json)" ] && (npm publish --workspace=lean4-infoview --access=public) || (echo "infoview version unchanged") - name: Package run: npm run package --workspace=lean4 From a59fd7abbf31ebd1053745a9c62c077141b44cc1 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 12:23:43 +0200 Subject: [PATCH 25/26] only publish infoview on release --- .github/workflows/on-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 80d28ffd4..88b2d3fe0 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -44,13 +44,13 @@ jobs: npm run build - name: Publish infoview-api (if new version) - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | [ "$(npm view @leanprover/infoview-api version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview-api/package.json)" ] && (npm publish --workspace=lean4-infoview-api --access=public) || (echo "infoview-api version unchanged") - name: Publish infoview (if new version) - if: ${{ (matrix.os == 'ubuntu-latest') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | [ "$(npm view @leanprover/infoview version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview/package.json)" ] && (npm publish --workspace=lean4-infoview --access=public) || (echo "infoview version unchanged") From 6e11f74e2e8c1e11c7c1d7e3e6cf9c1ef478ce4a Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 29 May 2024 14:42:02 +0200 Subject: [PATCH 26/26] simply fail and continue on unchanged version --- .github/workflows/on-push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 88b2d3fe0..5ce5f250c 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -43,17 +43,17 @@ jobs: npm ci npm run build - - name: Publish infoview-api (if new version) + - name: Try publishing infoview-api if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - [ "$(npm view @leanprover/infoview-api version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview-api/package.json)" ] && (npm publish --workspace=lean4-infoview-api --access=public) || (echo "infoview-api version unchanged") + npm publish --workspace=lean4-infoview-api --access=public - - name: Publish infoview (if new version) + - name: Try publishing infoview if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }} continue-on-error: true run: | - [ "$(npm view @leanprover/infoview version)" != "$(sed -n 's/^\s*"version":\s*"\(.*\)",\s*/\1/p' lean4-infoview/package.json)" ] && (npm publish --workspace=lean4-infoview --access=public) || (echo "infoview version unchanged") + npm publish --workspace=lean4-infoview --access=public - name: Package run: npm run package --workspace=lean4