From 331760a2f929360a6b6980937a3db72c048f0af0 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 22 Dec 2022 10:46:45 +0100 Subject: [PATCH 1/2] chore: fix packaging quirks - The official CLIs are used for packaging and publishing. - Dotfile directories are ignored. - `.yarnrc` has been removed. - `*.tgz` and `*.vsix` have been added to `.gitignore`. --- .github/workflows/publish.yml | 17 ++++++++--------- .gitignore | 3 ++- .vscodeignore | 1 + .yarnrc | 1 - package.json | 2 ++ 5 files changed, 13 insertions(+), 11 deletions(-) delete mode 100644 .yarnrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 25353d2d..03dbcba8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,18 +19,17 @@ jobs: - name: Install Dependencies run: npm install + - run: npx vsce package + - name: ovsx publish - uses: HaaLeo/publish-vscode-extension@v1 - id: ovsx_publish - with: - pat: ${{ secrets.OPEN_VSX_TOKEN }} + run: npx ovsx publish --packagePath *.vsix + env: + OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }} - name: vsce publish - uses: HaaLeo/publish-vscode-extension@v1 - with: - pat: ${{ secrets.VSCE_TOKEN }} - registryUrl: https://marketplace.visualstudio.com - extensionFile: ${{ steps.ovsx_publish.outputs.vsixPath }} + run: npx vsce publish --packagePath *.vsix + env: + VSCE_PAT: ${{ secrets.VSCE_TOKEN }} - uses: actions/upload-artifact@v3 with: diff --git a/.gitignore b/.gitignore index 7a686379..b2ba9e07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.log +*.tgz *.tsbuildinfo -.*cache +*.vsix .vscode-test/ node_modules/ diff --git a/.vscodeignore b/.vscodeignore index 197f487c..ffff7129 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,4 +1,5 @@ .* +.*/ *.log *.map *.ts diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index 123ac74a..00000000 --- a/.yarnrc +++ /dev/null @@ -1 +0,0 @@ -ignore-engines true diff --git a/package.json b/package.json index ae05028f..62523be6 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,11 @@ "devDependencies": { "@changesets/changelog-github": "^0.4.7", "@changesets/cli": "^2.25.2", + "ovsx": "^0.7.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", "typescript": "^4.8.4", + "vsce": "^2.0.0", "xo": "^0.53.0" }, "resolutions": { From fe370d05e659f59ed137f629478cc9865774cb4c Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 22 Dec 2022 12:15:23 +0100 Subject: [PATCH 2/2] chore: fix Prettier integration --- .prettierignore | 1 + package.json | 4 +--- syntaxes/mdx.tmLanguage.json | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.prettierignore b/.prettierignore index 1b9355bd..86b2da9d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ +*.md *.mdx diff --git a/package.json b/package.json index 62523be6..3524de69 100644 --- a/package.json +++ b/package.json @@ -29,15 +29,13 @@ "@changesets/changelog-github": "^0.4.7", "@changesets/cli": "^2.25.2", "ovsx": "^0.7.0", + "prettier": "^2.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", "typescript": "^4.8.4", "vsce": "^2.0.0", "xo": "^0.53.0" }, - "resolutions": { - "prettier": "^2.8.0" - }, "icon": "assets/mdx.png", "contributes": { "languages": [ diff --git a/syntaxes/mdx.tmLanguage.json b/syntaxes/mdx.tmLanguage.json index 114c1ad3..fb1733c0 100644 --- a/syntaxes/mdx.tmLanguage.json +++ b/syntaxes/mdx.tmLanguage.json @@ -8,7 +8,7 @@ { "include": "#markdown" }, - { + { "include": "#jsx-evaluated-code" } ], @@ -61,7 +61,7 @@ "end": "}", "contentName": "source.js.jsx", "patterns": [ - { + { "include": "source.js.jsx" } ]