tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
Merge branch 'pnp-support' of https://github.com/DanSnow/tailwindcss-intellisense into DanSnow-pnp-support
7 changed files, 652 additions(+), 123 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 73dd7f92b7e0db1bc15daf42e82c453bd47e5f33..87f0572e1ebade3ef5435f9d47574cd69428c59c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12130,6 +12130,17 @@ "dependencies": {
"buffer-crc32": "~0.2.3"
}
},
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"packages/tailwindcss-intellisense": {
"name": "vscode-tailwindcss",
"version": "0.5.4",
@@ -12149,6 +12160,7 @@ "dset": "^2.0.1",
"esm": "^3.2.25",
"execa": "^3.4.0",
"fast-glob": "^3.2.4",
+ "find-up": "^5.0.0",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
"jest": "^25.5.4",
@@ -12175,6 +12187,63 @@ "vscode-uri": "^2.1.1"
},
"engines": {
"vscode": "^1.33.0"
+ }
+ },
+ "packages/tailwindcss-intellisense/node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "packages/tailwindcss-intellisense/node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "packages/tailwindcss-intellisense/node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "packages/tailwindcss-intellisense/node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"packages/tailwindcss-intellisense/node_modules/tailwindcss-language-service": {
@@ -20174,6 +20243,7 @@ "dset": "^2.0.1",
"esm": "^3.2.25",
"execa": "^3.4.0",
"fast-glob": "^3.2.4",
+ "find-up": "^5.0.0",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
"jest": "^25.5.4",
@@ -20199,6 +20269,39 @@ "vscode-languageserver-textdocument": "^1.0.1",
"vscode-uri": "^2.1.1"
},
"dependencies": {
+ "find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "requires": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "requires": {
+ "p-locate": "^5.0.0"
+ }
+ },
+ "p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "requires": {
+ "yocto-queue": "^0.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "requires": {
+ "p-limit": "^3.0.2"
+ }
+ },
"tailwindcss-language-service": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/tailwindcss-language-service/-/tailwindcss-language-service-0.0.8.tgz",
@@ -20396,6 +20499,11 @@ "version": "2.5.1",
"requires": {
"buffer-crc32": "~0.2.3"
}
+ },
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
}
}
}
diff --git a/packages/tailwindcss-intellisense/package-lock.json b/packages/tailwindcss-intellisense/package-lock.json
index 2ed3c6c4404db1629f827660b7d4f2bc06d5a038..1e33672d46013f4def58ab4ed97e697b24bd358e 100644
--- a/packages/tailwindcss-intellisense/package-lock.json
+++ b/packages/tailwindcss-intellisense/package-lock.json
@@ -23,6 +23,7 @@ "dset": "^2.0.1",
"esm": "^3.2.25",
"execa": "^3.4.0",
"fast-glob": "^3.2.4",
+ "find-up": "^5.0.0",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
"jest": "^25.5.4",
@@ -1360,6 +1361,40 @@ "find-up": "^4.1.0",
"get-package-type": "^0.1.0",
"js-yaml": "^3.13.1",
"resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dependencies": {
+ "p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
@@ -4950,15 +4985,18 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
}
},
"node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dependencies": {
- "locate-path": "^5.0.0",
+ "locate-path": "^6.0.0",
"path-exists": "^4.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/flat-cache": {
@@ -7164,14 +7202,17 @@ "node": ">=4"
}
},
"node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dependencies": {
- "p-locate": "^4.1.0"
+ "p-locate": "^5.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lodash": {
@@ -8187,14 +8228,31 @@ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dependencies": {
- "p-limit": "^2.2.0"
+ "p-limit": "^3.0.2"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate/node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-reduce": {
@@ -8362,6 +8420,40 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"dependencies": {
"find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dependencies": {
+ "p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
@@ -8762,6 +8854,40 @@ "node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/read-pkg-up/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/read-pkg-up/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/read-pkg-up/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
"node_modules/read-pkg-up/node_modules/type-fest": {
@@ -13594,6 +13720,40 @@ "engines": {
"node": ">=6"
}
},
+ "node_modules/yargs/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/yauzl": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
@@ -13609,6 +13769,17 @@ "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz",
"integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==",
"dependencies": {
"buffer-crc32": "~0.2.3"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
}
},
@@ -14684,6 +14855,33 @@ "find-up": "^4.1.0",
"get-package-type": "^0.1.0",
"js-yaml": "^3.13.1",
"resolve-from": "^5.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ }
}
},
"@istanbuljs/schema": {
@@ -17477,11 +17675,11 @@ "pkg-dir": "^4.1.0"
}
},
"find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"requires": {
- "locate-path": "^5.0.0",
+ "locate-path": "^6.0.0",
"path-exists": "^4.0.0"
}
},
@@ -19190,11 +19388,11 @@ }
}
},
"locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"requires": {
- "p-locate": "^4.1.0"
+ "p-locate": "^5.0.0"
}
},
"lodash": {
@@ -19987,11 +20185,21 @@ "p-try": "^2.0.0"
}
},
"p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"requires": {
- "p-limit": "^2.2.0"
+ "p-limit": "^3.0.2"
+ },
+ "dependencies": {
+ "p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "requires": {
+ "yocto-queue": "^0.1.0"
+ }
+ }
}
},
"p-reduce": {
@@ -20116,6 +20324,33 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"requires": {
"find-up": "^4.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ }
}
},
"pkg-up": {
@@ -20433,6 +20668,31 @@ "read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
},
"dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
@@ -24238,6 +24498,33 @@ "string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ }
}
},
"yargs-parser": {
@@ -24265,6 +24552,11 @@ "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==",
"requires": {
"buffer-crc32": "~0.2.3"
}
+ },
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
}
}
}
diff --git a/packages/tailwindcss-intellisense/package.json b/packages/tailwindcss-intellisense/package.json
index 67747882975806896643926b9810f858ce7ea475..f4c863307b0c89f226a5b7e892e9f6f5da53953f 100755
--- a/packages/tailwindcss-intellisense/package.json
+++ b/packages/tailwindcss-intellisense/package.json
@@ -193,6 +193,7 @@ "dset": "^2.0.1",
"esm": "^3.2.25",
"execa": "^3.4.0",
"fast-glob": "^3.2.4",
+ "find-up": "^5.0.0",
"glob-exec": "^0.1.1",
"import-from": "^3.0.0",
"jest": "^25.5.4",
diff --git a/packages/tailwindcss-intellisense/src/class-names/environment.js b/packages/tailwindcss-intellisense/src/class-names/environment.js
new file mode 100644
index 0000000000000000000000000000000000000000..da905bec3130fc632697695f12ab7e3b0da82f94
--- /dev/null
+++ b/packages/tailwindcss-intellisense/src/class-names/environment.js
@@ -0,0 +1,72 @@
+import * as path from 'path'
+import Module from 'module'
+import findUp from 'find-up'
+import resolveFrom from 'resolve-from'
+import importFrom from 'import-from'
+
+export function withUserEnvironment(base, cb) {
+ const pnpPath = findUp.sync('.pnp.js', { cwd: base })
+ if (pnpPath) {
+ return withPnpEnvironment(pnpPath, cb)
+ }
+ return withNonPnpEnvironment(base, cb)
+}
+
+function withPnpEnvironment(pnpPath, cb) {
+ const basePath = path.dirname(pnpPath)
+
+ // pnp will patch `module` and `fs` to load package in pnp environment
+ // backup the functions which will be patched here
+ const originalModule = Object.create(null)
+ originalModule._load = Module._load
+ originalModule._resolveFilename = Module._resolveFilename
+ originalModule._findPath = Module._findPath
+
+ const pnpapi = __non_webpack_require__(pnpPath)
+
+ // get into pnp environment
+ pnpapi.setup()
+
+ // restore the patched function, we can not load any package after called this
+ const restore = () => Object.assign(Module, originalModule)
+
+ const pnpResolve = (request, from = basePath) => {
+ return pnpapi.resolveRequest(request, from + '/')
+ }
+
+ const pnpRequire = (request, from) => {
+ return __non_webpack_require__(pnpResolve(request, from))
+ }
+
+ const res = cb({ isPnP: true, resolve: pnpResolve, require: pnpRequire })
+
+ // check if it return a thenable
+ if (res != null && res.then) {
+ return res.then(
+ (x) => {
+ restore()
+ return x
+ },
+ (err) => {
+ restore()
+ throw err
+ }
+ )
+ }
+
+ restore()
+
+ return res
+}
+
+function withNonPnpEnvironment(base, cb) {
+ return cb({
+ isPnP: false,
+ require(request, from = base) {
+ return importFrom(from, request)
+ },
+ resolve(request, from = base) {
+ return resolveFrom(from, request)
+ },
+ })
+}
diff --git a/packages/tailwindcss-intellisense/src/class-names/getPlugins.js b/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
index 1fa3e50458f82284ed466a4f27251857d2dc76f1..ee27469707f7685e047c33a498079a4bbedf5ade 100644
--- a/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
+++ b/packages/tailwindcss-intellisense/src/class-names/getPlugins.js
@@ -2,22 +2,19 @@ import * as path from 'path'
import stackTrace from 'stack-trace'
import pkgUp from 'pkg-up'
import { isObject } from './isObject'
-import resolveFrom from 'resolve-from'
-import importFrom from 'import-from'
+import { withUserEnvironment } from './environment'
export async function getBuiltInPlugins({ cwd, resolvedConfig }) {
- const tailwindBase = path.dirname(
- resolveFrom(cwd, 'tailwindcss/package.json')
- )
-
- try {
- // TODO: add v0 support ("generators")
- return importFrom(tailwindBase, './lib/corePlugins.js').default({
- corePlugins: resolvedConfig.corePlugins,
- })
- } catch (_) {
- return []
- }
+ return withUserEnvironment(cwd, ({ require, resolve }) => {
+ const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
+ try {
+ return require('./lib/corePlugins.js', tailwindBase).default({
+ corePlugins: resolvedConfig.corePlugins,
+ })
+ } catch (_) {
+ return []
+ }
+ })
}
export default function getPlugins(config) {
diff --git a/packages/tailwindcss-intellisense/src/class-names/index.js b/packages/tailwindcss-intellisense/src/class-names/index.js
index 737b5bedf5f72851ca20936e5756e562e5049174..a66b13dc203d9ed0d1c9cedc2dd40ad14f0a05db 100644
--- a/packages/tailwindcss-intellisense/src/class-names/index.js
+++ b/packages/tailwindcss-intellisense/src/class-names/index.js
@@ -2,8 +2,6 @@ import extractClassNames from './extractClassNames'
import Hook from './hook'
import dlv from 'dlv'
import dset from 'dset'
-import resolveFrom from 'resolve-from'
-import importFrom from 'import-from'
import chokidar from 'chokidar'
import semver from 'semver'
import invariant from 'tiny-invariant'
@@ -15,6 +13,7 @@ import * as fs from 'fs'
import { getUtilityConfigMap } from './getUtilityConfigMap'
import glob from 'fast-glob'
import normalizePath from 'normalize-path'
+import { withUserEnvironment } from './environment'
import execa from 'execa'
function arraysEqual(arr1, arr2) {
@@ -32,11 +31,6 @@ cwd = process.cwd(),
{ onChange = () => {} } = {}
) {
async function run() {
- let postcss
- let tailwindcss
- let version
- let featureFlags = { future: [], experimental: [] }
-
const configPaths = (
await glob(CONFIG_GLOB, {
cwd,
@@ -54,17 +48,13 @@ invariant(configPaths.length > 0, 'No Tailwind CSS config found.')
const configPath = configPaths[0]
console.log(`Found Tailwind config file: ${configPath}`)
const configDir = path.dirname(configPath)
- const tailwindBase = path.dirname(
- resolveFrom(configDir, 'tailwindcss/package.json')
- )
- postcss = importFrom(tailwindBase, 'postcss')
- tailwindcss = importFrom(configDir, 'tailwindcss')
- version = importFrom(configDir, 'tailwindcss/package.json').version
- console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
+ const {
+ version,
+ featureFlags = { future: [], experimental: [] },
+ tailwindBase,
+ } = loadMeta(configDir)
- try {
- featureFlags = importFrom(tailwindBase, './lib/featureFlags.js').default
- } catch (_) {}
+ console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
const sepLocation = semver.gte(version, '0.99.0')
? ['separator']
@@ -91,55 +81,90 @@ }
hook.unwatch()
- let postcssResult
+ const {
+ base,
+ components,
+ utilities,
+ resolvedConfig,
+ browserslist,
+ postcss,
+ } = await withPackages(
+ configDir,
+ async ({
+ postcss,
+ tailwindcss,
+ browserslistCommand,
+ browserslistArgs,
+ }) => {
+ let postcssResult
+ try {
+ postcssResult = await Promise.all(
+ [
+ semver.gte(version, '0.99.0') ? 'base' : 'preflight',
+ 'components',
+ 'utilities',
+ ].map((group) =>
+ postcss([tailwindcss(configPath)]).process(
+ `@tailwind ${group};`,
+ {
+ from: undefined,
+ }
+ )
+ )
+ )
+ } catch (error) {
+ throw error
+ } finally {
+ hook.unhook()
+ }
- try {
- postcssResult = await Promise.all(
- [
- semver.gte(version, '0.99.0') ? 'base' : 'preflight',
- 'components',
- 'utilities',
- ].map((group) =>
- postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, {
- from: undefined,
- })
- )
- )
- } catch (error) {
- throw error
- } finally {
- hook.unhook()
- }
+ const [base, components, utilities] = postcssResult
- const [base, components, utilities] = postcssResult
+ if (typeof userSeperator !== 'undefined') {
+ dset(config, sepLocation, userSeperator)
+ } else {
+ delete config[sepLocation]
+ }
+ if (typeof userPurge !== 'undefined') {
+ config.purge = userPurge
+ } else {
+ delete config.purge
+ }
- if (typeof userSeperator !== 'undefined') {
- dset(config, sepLocation, userSeperator)
- } else {
- delete config[sepLocation]
- }
- if (typeof userPurge !== 'undefined') {
- config.purge = userPurge
- } else {
- delete config.purge
- }
+ const resolvedConfig = resolveConfig({ cwd: configDir, config })
- const resolvedConfig = resolveConfig({ cwd: configDir, config })
+ let browserslist = []
+ if (
+ browserslistCommand &&
+ semver.gte(version, '1.4.0') &&
+ semver.lte(version, '1.99.0')
+ ) {
+ try {
+ const { stdout } = await execa(
+ browserslistCommand,
+ browserslistArgs,
+ {
+ preferLocal: true,
+ localDir: configDir,
+ cwd: configDir,
+ }
+ )
+ browserslist = stdout.split('\n')
+ } catch (error) {
+ console.error('Failed to load browserslist:', error)
+ }
+ }
- let browserslist = []
- try {
- const { stdout, stderr } = await execa('browserslist', [], {
- preferLocal: true,
- localDir: configDir,
- cwd: configDir,
- })
- if (stderr) {
- throw Error(stderr)
+ return {
+ base,
+ components,
+ utilities,
+ resolvedConfig,
+ postcss,
+ browserslist,
+ }
}
- browserslist = stdout.split('\n')
- } catch (error) {
- console.error('Failed to load browserslist:', error)
- }
+ )
return {
version,
@@ -161,7 +186,6 @@ postcss,
browserslist,
}),
modules: {
- tailwindcss,
postcss,
},
featureFlags,
@@ -210,3 +234,46 @@ watch([result.configPath, ...result.dependencies])
return result
}
+
+function loadMeta(configDir) {
+ return withUserEnvironment(configDir, ({ require, resolve }) => {
+ const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
+ const version = require('tailwindcss/package.json').version
+ let featureFlags
+
+ try {
+ featureFlags = require('./lib/featureFlags.js', tailwindBase).default
+ } catch (_) {}
+
+ return { version, featureFlags, tailwindBase }
+ })
+}
+
+function withPackages(configDir, cb) {
+ return withUserEnvironment(configDir, async ({ isPnP, require, resolve }) => {
+ const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
+ const postcss = require('postcss', tailwindBase)
+ const tailwindcss = require('tailwindcss')
+
+ let browserslistCommand
+ let browserslistArgs = []
+ try {
+ const browserslistBin = resolve(
+ path.join(
+ 'browserslist',
+ require('browserslist/package.json', tailwindBase).bin.browserslist
+ ),
+ tailwindBase
+ )
+ if (isPnP) {
+ browserslistCommand = 'yarn'
+ browserslistArgs = ['node', browserslistBin]
+ } else {
+ browserslistCommand = process.execPath
+ browserslistArgs = [browserslistBin]
+ }
+ } catch (_) {}
+
+ return cb({ postcss, tailwindcss, browserslistCommand, browserslistArgs })
+ })
+}
diff --git a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
index 49a31546ef78ffbbec10b5d55dabb74b798a15e8..6085a00b9366ac34fc3fca64ea9102823e7cd2e3 100644
--- a/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
+++ b/packages/tailwindcss-intellisense/src/class-names/resolveConfig.js
@@ -1,14 +1,8 @@
-import resolveFrom from 'resolve-from'
-import importFrom from 'import-from'
import * as path from 'path'
import decache from './decache'
+import { withUserEnvironment } from './environment'
export default function resolveConfig({ cwd, config }) {
- const tailwindBase = path.dirname(
- resolveFrom(cwd, 'tailwindcss/package.json')
- )
- let resolve = (x) => x
-
if (typeof config === 'string') {
if (!cwd) {
cwd = path.dirname(config)
@@ -17,21 +11,19 @@ decache(config)
config = __non_webpack_require__(config)
}
- try {
- resolve = importFrom(tailwindBase, './resolveConfig.js')
- } catch (_) {
+ let resolve = (x) => x
+ withUserEnvironment(cwd, ({ require, resolve }) => {
+ const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
try {
- const resolveConfig = importFrom(
- tailwindBase,
- './lib/util/resolveConfig.js'
- )
- const defaultConfig = importFrom(
- tailwindBase,
- './stubs/defaultConfig.stub.js'
- )
- resolve = (config) => resolveConfig([config, defaultConfig])
- } catch (_) {}
- }
+ resolve = require('./resolveConfig.js', tailwindBase)
+ } catch (_) {
+ try {
+ const resolveConfig = require('./lib/util/resolveConfig.js', tailwindBase)
+ const defaultConfig = require('./stubs/defaultConfig.stub.js', tailwindBase)
+ resolve = (config) => resolveConfig([config, defaultConfig])
+ } catch (_) {}
+ }
+ })
return resolve(config)
}