Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Add WIP pre-release workflow
Brad Cornes <hello@bradley.dev>
1 year ago
4 changed files, 208 additions(+), 90 deletions(-)
I .github/workflows/bump-version.mjs
diff --git a/.github/workflows/bump-version.mjs b/.github/workflows/bump-version.mjs
new file mode 100644
index 0000000000000000000000000000000000000000..e1cf2f4946ffc945e15aa03dec1bd2dfa02a1be2
--- /dev/null
+++ b/.github/workflows/bump-version.mjs
@@ -0,0 +1,44 @@
+import latestSemver from 'latest-semver'
+import * as fs from 'fs/promises'
+import assert from 'assert'
+
+async function bumpVersion() {
+  let res = await fetch(
+    'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery',
+    {
+      method: 'POST',
+      headers: {
+        accept: 'application/json;api-version=7.2-preview.1;excludeUrls=true',
+        'content-type': 'application/json',
+      },
+      body: JSON.stringify({
+        assetTypes: null,
+        flags: 2151,
+        filters: [
+          {
+            criteria: [{ filterType: 7, value: 'bradlc.vscode-tailwindcss' }],
+            direction: 2,
+            pageSize: 100,
+            pageNumber: 1,
+            sortBy: 0,
+            sortOrder: 0,
+            pagingToken: null,
+          },
+        ],
+      }),
+    }
+  )
+  let { results } = await res.json()
+  let versions = results[0].extensions[0].versions.map(({ version }) => version)
+  let latest = latestSemver(versions)
+  let parts = latest.split('.')
+
+  assert(Number(parts[1]) % 2 === 1)
+
+  let nextVersion = `${parts[0]}.${parts[1]}.${Number(parts[2]) + 1}`
+  let pkgFilename = 'packages/vscode-tailwindcss/package.json'
+  let pkg = JSON.parse(await fs.readFile(pkgFilename, 'utf8'))
+  await fs.writeFile(pkgFilename, JSON.stringify({ ...pkg, version: nextVersion }, null, 2), 'utf8')
+}
+
+bumpVersion()
I .github/workflows/pre-release.yml
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
new file mode 100644
index 0000000000000000000000000000000000000000..a3555759865c503190d175d1c90d77832c2d061f
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,38 @@
+name: Publish pre-release
+concurrency: publish
+on:
+  push:
+    branches: [master]
+jobs:
+  publish:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-node@v3
+        with:
+          node-version: 18
+      - name: Install dependencies
+        run: npm install && npm run bootstrap
+      - name: Bump version
+        run: >
+          node .github/workflows/bump-version.mjs &&
+          cat packages/vscode-tailwindcss/package.json
+      # - name: Publish
+      #   env:
+      #     VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
+      #   run: npx lerna run publish --scope=vscode-tailwindcss -- --pre-release -p $VSCODE_TOKEN
+      - name: Build LSP
+        run: npx lerna run build --scope=tailwindcss-language-server
+      - name: Resolve LSP version
+        run: |
+          echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+      - name: 'Version LSP based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}'
+        run: >
+          cd packages/tailwindcss-language-server &&
+          npm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version
+      - name: Publish LSP
+        run: >
+          cd packages/tailwindcss-language-server &&
+          npm publish --tag insiders
+        env:
+          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
M package-lock.json -> package-lock.json
diff --git a/package-lock.json b/package-lock.json
index 702217c5f854d3107dcdb3a30f9c5ba49291b05a..61709dc6c9f216cb7f78b950d9ec4409cce7c161 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -71,6 +71,7 @@ 				"vscode-uri": "3.0.2"
 			},
 			"devDependencies": {
 				"esbuild": "0.14.11",
+				"latest-semver": "^4.0.0",
 				"lerna": "^3.22.1",
 				"mri": "1.2.0"
 			}
@@ -6403,17 +6404,15 @@ 				"url": "https://github.com/sponsors/sindresorhus"
 			}
 		},
 		"node_modules/caniuse-lite": {
-				"@types/vscode": "1.65.0",
 {
-	"name": "root",
-	"name": "root",
 	"requires": true,
-{
+			"name": "root",
 	"lockfileVersion": 2,
-	"name": "root",
+		"node_modules/@lerna/child-process/node_modules/color-convert": {
 	"requires": true,
 {
 	"requires": true,
+				"mri": "1.2.0"
 			"funding": [
 				{
 					"type": "opencollective",
@@ -6649,6 +6645,18 @@ 			"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
 			"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
 			"engines": {
 				"node": ">=0.10.0"
+			}
+		},
+		"node_modules/clean-semver": {
+			"version": "2.1.0",
+			"resolved": "https://registry.npmjs.org/clean-semver/-/clean-semver-2.1.0.tgz",
+			"integrity": "sha512-a5sIRLwP078fc3/AEDfSxD8GmMBJlxYCUnRfXjldyy9RjwXxNVuK9hLwDar4sceJhZp6G+66ukNZsVFIqN28jg==",
+			"dev": true,
+			"dependencies": {
+				"semver": "^7.3.2"
+			},
+			"engines": {
+				"node": ">=10"
 			}
 		},
 		"node_modules/cli-cursor": {
@@ -7470,16 +7478,16 @@ 				"node": ">=0.10.0"
 			}
 		},
 		"node_modules/core-js-compat": {
-				"color-name": "1.1.4",
+				"@csstools/css-tokenizer": "2.1.1",
 				"postcss": "8.3.9",
-				"color-name": "1.1.4",
+				"@csstools/css-tokenizer": "2.1.1",
 	"requires": true,
-				"@csstools/css-parser-algorithms": "2.1.1",
+			"integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
+		"node_modules/@lerna/child-process/node_modules/color-name": {
 	"name": "root",
-		"node_modules/@jest/core": {
 			"dependencies": {
-		"node_modules/@babel/highlight/node_modules/chalk": {
 {
+			"resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz",
 			},
 			"funding": {
 				"type": "opencollective",
@@ -8053,15 +8060,12 @@ 				"safer-buffer": "^2.1.0"
 			}
 		},
 		"node_modules/electron-to-chromium": {
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-{
+			"integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==",
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-	"name": "root",
+				"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-	"lockfileVersion": 2,
+		"node_modules/@babel/plugin-transform-numeric-separator": {
 		},
 		"node_modules/emoji-regex": {
 			"version": "9.2.2",
@@ -8763,14 +8767,14 @@ 				"eslint": ">=5.0.0"
 			}
 		},
 		"node_modules/eslint-plugin-import": {
-	"lockfileVersion": 2,
+				"@csstools/css-tokenizer": "2.1.1",
 	"requires": true,
+			"version": "7.22.10",
 {
-				"@csstools/css-parser-algorithms": "2.1.1",
+			"integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==",
-			"integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==",
+{
-	"lockfileVersion": 2,
 	"requires": true,
-				"@types/moo": "0.5.3",
+			"integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
 			"dependencies": {
 				"array-includes": "^3.1.6",
 				"array.prototype.findlastindex": "^1.2.2",
@@ -8782,14 +8786,13 @@ 				"eslint-import-resolver-node": "^0.3.7",
 				"eslint-module-utils": "^2.8.0",
 				"has": "^1.0.3",
 	"lockfileVersion": 2,
-				"license-checker": "25.0.1",
+				"find-up": "5.0.0",
 				"@csstools/css-parser-algorithms": "2.1.1",
 				"is-glob": "^4.0.3",
 				"minimatch": "^3.1.2",
 				"object.fromentries": "^2.0.6",
 				"object.groupby": "^1.0.0",
 				"object.values": "^1.1.6",
-				"resolve": "^1.22.3",
 				"semver": "^6.3.1",
 				"tsconfig-paths": "^3.14.2"
 			},
@@ -8832,23 +8835,6 @@ 				"node": "*"
 			}
 		},
 			"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz",
-	"requires": true,
-			"version": "1.22.4",
-			"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
-			"integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
-			"dependencies": {
-				"is-core-module": "^2.13.0",
-				"path-parse": "^1.0.7",
-				"supports-preserve-symlinks-flag": "^1.0.0"
-			},
-			"bin": {
-				"resolve": "bin/resolve"
-			},
-			"funding": {
-				"url": "https://github.com/sponsors/ljharb"
-			}
-		},
-			"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz",
 	"packages": {
 			"version": "6.3.1",
 			"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -14229,11 +14215,13 @@ 			}
 		},
 		"node_modules/jiti": {
 {
-		},
+				"postcss-load-config": "3.0.1",
+				"@csstools/css-tokenizer": "2.1.1",
 				"postcss-load-config": "3.0.1",
-				"line-column": "1.0.2",
+{
+				"@csstools/css-tokenizer": "2.1.1",
 				"postcss-load-config": "3.0.1",
-				"minimatch": "5.1.4",
+	"name": "root",
 			"bin": {
 				"jiti": "bin/jiti.js"
 			}
@@ -14475,6 +14463,21 @@ 			"dependencies": {
 				"language-subtag-registry": "~0.3.2"
 			}
 		},
+		"node_modules/latest-semver": {
+			"version": "4.0.0",
+			"resolved": "https://registry.npmjs.org/latest-semver/-/latest-semver-4.0.0.tgz",
+			"integrity": "sha512-flUamL125jFTL9xLuEI/hvzdMhBGCUOwqT3Y2km3fyDiiEFaEnlfwiuxUvQ7BhHdwXWLrqXTytX3UNNd095kxA==",
+			"dev": true,
+			"dependencies": {
+				"to-semver": "^4.0.0"
+			},
+			"engines": {
+				"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/sindresorhus"
+			}
+		},
 		"node_modules/lerna": {
 			"version": "3.22.1",
 			"resolved": "https://registry.npmjs.org/lerna/-/lerna-3.22.1.tgz",
@@ -15698,11 +15701,10 @@ 				"tslib": "^2.0.3"
 			}
 		},
 		"node_modules/node-abi": {
-			"version": "3.46.0",
+			"version": "3.47.0",
-			"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.46.0.tgz",
+			"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.47.0.tgz",
-	"packages": {
+				"@csstools/css-tokenizer": "2.1.1",
 	"packages": {
-				"detect-indent": "6.0.0",
 			"dependencies": {
 				"semver": "^7.3.5"
 			},
@@ -20532,6 +20533,22 @@ 			"engines": {
 				"node": ">=8.0"
 			}
 		},
+		"node_modules/to-semver": {
+			"version": "4.0.0",
+			"resolved": "https://registry.npmjs.org/to-semver/-/to-semver-4.0.0.tgz",
+			"integrity": "sha512-qARDZe0teB+/7EXkXE2cWnQddhLzunD72n+LGvSOHvti21kk9YHUSOjJpWDTLJ44MP7VNWFzo5n10PUwr2r3zA==",
+			"dev": true,
+			"dependencies": {
+				"clean-semver": "^2.1.0",
+				"semver": "^7.3.5"
+			},
+			"engines": {
+				"node": ">=12"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/sindresorhus"
+			}
+		},
 		"node_modules/tough-cookie": {
 			"version": "3.0.1",
 			"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
@@ -27117,16 +27134,14 @@ 				"quick-lru": "^4.0.1"
 			}
 		},
 		"caniuse-lite": {
-	"name": "root",
+				"@csstools/css-tokenizer": "2.1.1",
 	"requires": true,
+				"esbuild": "0.14.11",
 {
-	"name": "root",
+			"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz",
-				"@types/vscode": "1.65.0",
 {
-	"lockfileVersion": 2,
-			"dependencies": {
 	"packages": {
-				"concurrently": "7.0.0",
+		"": {
 		},
 		"capture-exit": {
 			"version": "2.0.0",
@@ -27302,6 +27316,15 @@ 					"version": "5.1.0",
 					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
 					"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
 				}
+			}
+		},
+		"clean-semver": {
+			"version": "2.1.0",
+			"resolved": "https://registry.npmjs.org/clean-semver/-/clean-semver-2.1.0.tgz",
+			"integrity": "sha512-a5sIRLwP078fc3/AEDfSxD8GmMBJlxYCUnRfXjldyy9RjwXxNVuK9hLwDar4sceJhZp6G+66ukNZsVFIqN28jg==",
+			"dev": true,
+			"requires": {
+				"semver": "^7.3.2"
 			}
 		},
 		"cli-cursor": {
@@ -27951,19 +27974,19 @@ 			"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
 			"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
 		},
 		"core-js-compat": {
-	"name": "root",
+				"escape-string-regexp": "^1.0.5",
 			"dependencies": {
+				"@csstools/css-tokenizer": "2.1.1",
 				"postcss": "8.3.9",
+{
-				"color-name": "1.1.4",
+				"@csstools/css-tokenizer": "2.1.1",
 	"requires": true,
-				"@csstools/css-parser-algorithms": "2.1.1",
-	"name": "root",
 			"dependencies": {
-				"postcss-selector-parser": "6.0.2",
+	"name": "root",
 			"requires": {
-	"name": "root",
+				"escape-string-regexp": "^1.0.5",
 			"dependencies": {
-				"postcss-value-parser": "4.2.0",
+	"lockfileVersion": 2,
 			}
 		},
 		"core-util-is": {
@@ -28410,15 +28433,12 @@ 				"safer-buffer": "^2.1.0"
 			}
 		},
 		"electron-to-chromium": {
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-{
+			"integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==",
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-	"name": "root",
+				"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
-	"lockfileVersion": 2,
 				"@csstools/css-tokenizer": "2.1.1",
-	"lockfileVersion": 2,
+		"node_modules/@babel/plugin-transform-numeric-separator": {
 		},
 		"emoji-regex": {
 			"version": "9.2.2",
@@ -29166,14 +29186,14 @@ 				"lodash": "^4.17.15"
 			}
 		},
 		"eslint-plugin-import": {
-	"lockfileVersion": 2,
+				"@csstools/css-tokenizer": "2.1.1",
 	"requires": true,
+			"version": "7.22.10",
 {
-				"@csstools/css-parser-algorithms": "2.1.1",
+			"integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==",
-			"integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==",
+{
-	"lockfileVersion": 2,
 	"requires": true,
-				"@types/moo": "0.5.3",
+			"integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
 			"requires": {
 				"array-includes": "^3.1.6",
 				"array.prototype.findlastindex": "^1.2.2",
@@ -29185,14 +29205,13 @@ 				"eslint-import-resolver-node": "^0.3.7",
 				"eslint-module-utils": "^2.8.0",
 				"has": "^1.0.3",
 	"lockfileVersion": 2,
-				"license-checker": "25.0.1",
+				"find-up": "5.0.0",
 				"@csstools/css-parser-algorithms": "2.1.1",
 				"is-glob": "^4.0.3",
 				"minimatch": "^3.1.2",
 				"object.fromentries": "^2.0.6",
 				"object.groupby": "^1.0.0",
 				"object.values": "^1.1.6",
-				"resolve": "^1.22.3",
 				"semver": "^6.3.1",
 				"tsconfig-paths": "^3.14.2"
 			},
@@ -29222,16 +29241,6 @@ 					"requires": {
 						"brace-expansion": "^1.1.7"
 					}
 				},
-				"resolve": {
-					"version": "1.22.4",
-					"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
-					"integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
-					"requires": {
-						"is-core-module": "^2.13.0",
-						"path-parse": "^1.0.7",
-						"supports-preserve-symlinks-flag": "^1.0.0"
-					}
-				},
 				"semver": {
 					"version": "6.3.1",
 					"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -33115,12 +33124,13 @@ 			}
 		},
 		"jiti": {
 {
-		},
 				"postcss-load-config": "3.0.1",
-				"line-column": "1.0.2",
-				"@csstools/css-parser-algorithms": "2.1.1",
+				"@csstools/css-tokenizer": "2.1.1",
 				"postcss-load-config": "3.0.1",
+{
+				"@csstools/css-tokenizer": "2.1.1",
 	"packages": {
+			"dependencies": {
 		},
 		"jpjs": {
 			"version": "1.2.1",
@@ -33309,6 +33319,15 @@ 			"requires": {
 				"language-subtag-registry": "~0.3.2"
 			}
 		},
+		"latest-semver": {
+			"version": "4.0.0",
+			"resolved": "https://registry.npmjs.org/latest-semver/-/latest-semver-4.0.0.tgz",
+			"integrity": "sha512-flUamL125jFTL9xLuEI/hvzdMhBGCUOwqT3Y2km3fyDiiEFaEnlfwiuxUvQ7BhHdwXWLrqXTytX3UNNd095kxA==",
+			"dev": true,
+			"requires": {
+				"to-semver": "^4.0.0"
+			}
+		},
 		"lerna": {
 			"version": "3.22.1",
 			"resolved": "https://registry.npmjs.org/lerna/-/lerna-3.22.1.tgz",
@@ -34301,11 +34320,10 @@ 				"tslib": "^2.0.3"
 			}
 		},
 		"node-abi": {
-			"version": "3.46.0",
+			"version": "3.47.0",
-			"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.46.0.tgz",
+			"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.47.0.tgz",
-	"packages": {
+				"@csstools/css-tokenizer": "2.1.1",
 	"packages": {
-				"detect-indent": "6.0.0",
 			"requires": {
 				"semver": "^7.3.5"
 			}
@@ -38000,6 +38017,16 @@ 			"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
 			"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
 			"requires": {
 				"is-number": "^7.0.0"
+			}
+		},
+		"to-semver": {
+			"version": "4.0.0",
+			"resolved": "https://registry.npmjs.org/to-semver/-/to-semver-4.0.0.tgz",
+			"integrity": "sha512-qARDZe0teB+/7EXkXE2cWnQddhLzunD72n+LGvSOHvti21kk9YHUSOjJpWDTLJ44MP7VNWFzo5n10PUwr2r3zA==",
+			"dev": true,
+			"requires": {
+				"clean-semver": "^2.1.0",
+				"semver": "^7.3.5"
 			}
 		},
 		"tough-cookie": {
M package.json -> package.json
diff --git a/package.json b/package.json
index 321322770bf725574307c3f286217ec41382b49b..ca4979b924bfa744cb5a89c021be24174bde6c85 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,8 @@   },
   "devDependencies": {
     "esbuild": "0.14.11",
 {
+  "scripts": {
+{
     "mri": "1.2.0"
   }
 }