Merge branch 'DanSnow-pnp-support'

master
Brad Cornes 2020-12-03 17:24:12 +00:00
commit 0bd003b082
7 changed files with 652 additions and 123 deletions

108
package-lock.json generated
View File

@ -12130,6 +12130,17 @@
"buffer-crc32": "~0.2.3" "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": { "packages/tailwindcss-intellisense": {
"name": "vscode-tailwindcss", "name": "vscode-tailwindcss",
"version": "0.5.4", "version": "0.5.4",
@ -12149,6 +12160,7 @@
"esm": "^3.2.25", "esm": "^3.2.25",
"execa": "^3.4.0", "execa": "^3.4.0",
"fast-glob": "^3.2.4", "fast-glob": "^3.2.4",
"find-up": "^5.0.0",
"glob-exec": "^0.1.1", "glob-exec": "^0.1.1",
"import-from": "^3.0.0", "import-from": "^3.0.0",
"jest": "^25.5.4", "jest": "^25.5.4",
@ -12177,6 +12189,63 @@
"vscode": "^1.33.0" "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": { "packages/tailwindcss-intellisense/node_modules/tailwindcss-language-service": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/tailwindcss-language-service/-/tailwindcss-language-service-0.0.8.tgz", "resolved": "https://registry.npmjs.org/tailwindcss-language-service/-/tailwindcss-language-service-0.0.8.tgz",
@ -20174,6 +20243,7 @@
"esm": "^3.2.25", "esm": "^3.2.25",
"execa": "^3.4.0", "execa": "^3.4.0",
"fast-glob": "^3.2.4", "fast-glob": "^3.2.4",
"find-up": "^5.0.0",
"glob-exec": "^0.1.1", "glob-exec": "^0.1.1",
"import-from": "^3.0.0", "import-from": "^3.0.0",
"jest": "^25.5.4", "jest": "^25.5.4",
@ -20199,6 +20269,39 @@
"vscode-uri": "^2.1.1" "vscode-uri": "^2.1.1"
}, },
"dependencies": { "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": { "tailwindcss-language-service": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/tailwindcss-language-service/-/tailwindcss-language-service-0.0.8.tgz", "resolved": "https://registry.npmjs.org/tailwindcss-language-service/-/tailwindcss-language-service-0.0.8.tgz",
@ -20396,6 +20499,11 @@
"requires": { "requires": {
"buffer-crc32": "~0.2.3" "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=="
} }
} }
} }

View File

@ -23,6 +23,7 @@
"esm": "^3.2.25", "esm": "^3.2.25",
"execa": "^3.4.0", "execa": "^3.4.0",
"fast-glob": "^3.2.4", "fast-glob": "^3.2.4",
"find-up": "^5.0.0",
"glob-exec": "^0.1.1", "glob-exec": "^0.1.1",
"import-from": "^3.0.0", "import-from": "^3.0.0",
"jest": "^25.5.4", "jest": "^25.5.4",
@ -1365,6 +1366,40 @@
"node": ">=8" "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"
}
},
"node_modules/@istanbuljs/schema": { "node_modules/@istanbuljs/schema": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz",
@ -4950,15 +4985,18 @@
} }
}, },
"node_modules/find-up": { "node_modules/find-up": {
"version": "4.1.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dependencies": { "dependencies": {
"locate-path": "^5.0.0", "locate-path": "^6.0.0",
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/flat-cache": { "node_modules/flat-cache": {
@ -7164,14 +7202,17 @@
} }
}, },
"node_modules/locate-path": { "node_modules/locate-path": {
"version": "5.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dependencies": { "dependencies": {
"p-locate": "^4.1.0" "p-locate": "^5.0.0"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/lodash": { "node_modules/lodash": {
@ -8187,14 +8228,31 @@
} }
}, },
"node_modules/p-locate": { "node_modules/p-locate": {
"version": "4.1.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dependencies": { "dependencies": {
"p-limit": "^2.2.0" "p-limit": "^3.0.2"
}, },
"engines": { "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": { "node_modules/p-reduce": {
@ -8367,6 +8425,40 @@
"node": ">=8" "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"
}
},
"node_modules/pkg-up": { "node_modules/pkg-up": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
@ -8764,6 +8856,40 @@
"url": "https://github.com/sponsors/sindresorhus" "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": { "node_modules/read-pkg-up/node_modules/type-fest": {
"version": "0.8.1", "version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
@ -13594,6 +13720,40 @@
"node": ">=6" "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": { "node_modules/yauzl": {
"version": "2.10.0", "version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
@ -13610,6 +13770,17 @@
"dependencies": { "dependencies": {
"buffer-crc32": "~0.2.3" "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"
}
} }
}, },
"dependencies": { "dependencies": {
@ -14684,6 +14855,33 @@
"get-package-type": "^0.1.0", "get-package-type": "^0.1.0",
"js-yaml": "^3.13.1", "js-yaml": "^3.13.1",
"resolve-from": "^5.0.0" "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": { "@istanbuljs/schema": {
@ -17477,11 +17675,11 @@
} }
}, },
"find-up": { "find-up": {
"version": "4.1.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"requires": { "requires": {
"locate-path": "^5.0.0", "locate-path": "^6.0.0",
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
} }
}, },
@ -19190,11 +19388,11 @@
} }
}, },
"locate-path": { "locate-path": {
"version": "5.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"requires": { "requires": {
"p-locate": "^4.1.0" "p-locate": "^5.0.0"
} }
}, },
"lodash": { "lodash": {
@ -19987,11 +20185,21 @@
} }
}, },
"p-locate": { "p-locate": {
"version": "4.1.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"requires": { "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": { "p-reduce": {
@ -20116,6 +20324,33 @@
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"requires": { "requires": {
"find-up": "^4.0.0" "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": { "pkg-up": {
@ -20433,6 +20668,31 @@
"type-fest": "^0.8.1" "type-fest": "^0.8.1"
}, },
"dependencies": { "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": { "type-fest": {
"version": "0.8.1", "version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
@ -24238,6 +24498,33 @@
"which-module": "^2.0.0", "which-module": "^2.0.0",
"y18n": "^4.0.0", "y18n": "^4.0.0",
"yargs-parser": "^18.1.2" "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": { "yargs-parser": {
@ -24265,6 +24552,11 @@
"requires": { "requires": {
"buffer-crc32": "~0.2.3" "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=="
} }
} }
} }

View File

@ -193,6 +193,7 @@
"esm": "^3.2.25", "esm": "^3.2.25",
"execa": "^3.4.0", "execa": "^3.4.0",
"fast-glob": "^3.2.4", "fast-glob": "^3.2.4",
"find-up": "^5.0.0",
"glob-exec": "^0.1.1", "glob-exec": "^0.1.1",
"import-from": "^3.0.0", "import-from": "^3.0.0",
"jest": "^25.5.4", "jest": "^25.5.4",

View File

@ -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)
},
})
}

View File

@ -2,22 +2,19 @@ import * as path from 'path'
import stackTrace from 'stack-trace' import stackTrace from 'stack-trace'
import pkgUp from 'pkg-up' import pkgUp from 'pkg-up'
import { isObject } from './isObject' import { isObject } from './isObject'
import resolveFrom from 'resolve-from' import { withUserEnvironment } from './environment'
import importFrom from 'import-from'
export async function getBuiltInPlugins({ cwd, resolvedConfig }) { export async function getBuiltInPlugins({ cwd, resolvedConfig }) {
const tailwindBase = path.dirname( return withUserEnvironment(cwd, ({ require, resolve }) => {
resolveFrom(cwd, 'tailwindcss/package.json') const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
)
try { try {
// TODO: add v0 support ("generators") return require('./lib/corePlugins.js', tailwindBase).default({
return importFrom(tailwindBase, './lib/corePlugins.js').default({
corePlugins: resolvedConfig.corePlugins, corePlugins: resolvedConfig.corePlugins,
}) })
} catch (_) { } catch (_) {
return [] return []
} }
})
} }
export default function getPlugins(config) { export default function getPlugins(config) {

View File

@ -2,8 +2,6 @@ import extractClassNames from './extractClassNames'
import Hook from './hook' import Hook from './hook'
import dlv from 'dlv' import dlv from 'dlv'
import dset from 'dset' import dset from 'dset'
import resolveFrom from 'resolve-from'
import importFrom from 'import-from'
import chokidar from 'chokidar' import chokidar from 'chokidar'
import semver from 'semver' import semver from 'semver'
import invariant from 'tiny-invariant' import invariant from 'tiny-invariant'
@ -15,6 +13,7 @@ import * as fs from 'fs'
import { getUtilityConfigMap } from './getUtilityConfigMap' import { getUtilityConfigMap } from './getUtilityConfigMap'
import glob from 'fast-glob' import glob from 'fast-glob'
import normalizePath from 'normalize-path' import normalizePath from 'normalize-path'
import { withUserEnvironment } from './environment'
import execa from 'execa' import execa from 'execa'
function arraysEqual(arr1, arr2) { function arraysEqual(arr1, arr2) {
@ -32,11 +31,6 @@ export default async function getClassNames(
{ onChange = () => {} } = {} { onChange = () => {} } = {}
) { ) {
async function run() { async function run() {
let postcss
let tailwindcss
let version
let featureFlags = { future: [], experimental: [] }
const configPaths = ( const configPaths = (
await glob(CONFIG_GLOB, { await glob(CONFIG_GLOB, {
cwd, cwd,
@ -54,17 +48,13 @@ export default async function getClassNames(
const configPath = configPaths[0] const configPath = configPaths[0]
console.log(`Found Tailwind config file: ${configPath}`) console.log(`Found Tailwind config file: ${configPath}`)
const configDir = path.dirname(configPath) const configDir = path.dirname(configPath)
const tailwindBase = path.dirname( const {
resolveFrom(configDir, 'tailwindcss/package.json') version,
) featureFlags = { future: [], experimental: [] },
postcss = importFrom(tailwindBase, 'postcss') tailwindBase,
tailwindcss = importFrom(configDir, 'tailwindcss') } = loadMeta(configDir)
version = importFrom(configDir, 'tailwindcss/package.json').version
console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
try { console.log(`Found tailwindcss v${version}: ${tailwindBase}`)
featureFlags = importFrom(tailwindBase, './lib/featureFlags.js').default
} catch (_) {}
const sepLocation = semver.gte(version, '0.99.0') const sepLocation = semver.gte(version, '0.99.0')
? ['separator'] ? ['separator']
@ -91,8 +81,22 @@ export default async function getClassNames(
hook.unwatch() hook.unwatch()
const {
base,
components,
utilities,
resolvedConfig,
browserslist,
postcss,
} = await withPackages(
configDir,
async ({
postcss,
tailwindcss,
browserslistCommand,
browserslistArgs,
}) => {
let postcssResult let postcssResult
try { try {
postcssResult = await Promise.all( postcssResult = await Promise.all(
[ [
@ -100,9 +104,12 @@ export default async function getClassNames(
'components', 'components',
'utilities', 'utilities',
].map((group) => ].map((group) =>
postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, { postcss([tailwindcss(configPath)]).process(
`@tailwind ${group};`,
{
from: undefined, from: undefined,
}) }
)
) )
) )
} catch (error) { } catch (error) {
@ -127,19 +134,37 @@ export default async function getClassNames(
const resolvedConfig = resolveConfig({ cwd: configDir, config }) const resolvedConfig = resolveConfig({ cwd: configDir, config })
let browserslist = [] let browserslist = []
if (
browserslistCommand &&
semver.gte(version, '1.4.0') &&
semver.lte(version, '1.99.0')
) {
try { try {
const { stdout, stderr } = await execa('browserslist', [], { const { stdout } = await execa(
browserslistCommand,
browserslistArgs,
{
preferLocal: true, preferLocal: true,
localDir: configDir, localDir: configDir,
cwd: configDir, cwd: configDir,
})
if (stderr) {
throw Error(stderr)
} }
)
browserslist = stdout.split('\n') browserslist = stdout.split('\n')
} catch (error) { } catch (error) {
console.error('Failed to load browserslist:', error) console.error('Failed to load browserslist:', error)
} }
}
return {
base,
components,
utilities,
resolvedConfig,
postcss,
browserslist,
}
}
)
return { return {
version, version,
@ -161,7 +186,6 @@ export default async function getClassNames(
browserslist, browserslist,
}), }),
modules: { modules: {
tailwindcss,
postcss, postcss,
}, },
featureFlags, featureFlags,
@ -210,3 +234,46 @@ export default async function getClassNames(
return result 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 })
})
}

View File

@ -1,14 +1,8 @@
import resolveFrom from 'resolve-from'
import importFrom from 'import-from'
import * as path from 'path' import * as path from 'path'
import decache from './decache' import decache from './decache'
import { withUserEnvironment } from './environment'
export default function resolveConfig({ cwd, config }) { export default function resolveConfig({ cwd, config }) {
const tailwindBase = path.dirname(
resolveFrom(cwd, 'tailwindcss/package.json')
)
let resolve = (x) => x
if (typeof config === 'string') { if (typeof config === 'string') {
if (!cwd) { if (!cwd) {
cwd = path.dirname(config) cwd = path.dirname(config)
@ -17,21 +11,19 @@ export default function resolveConfig({ cwd, config }) {
config = __non_webpack_require__(config) config = __non_webpack_require__(config)
} }
let resolve = (x) => x
withUserEnvironment(cwd, ({ require, resolve }) => {
const tailwindBase = path.dirname(resolve('tailwindcss/package.json'))
try { try {
resolve = importFrom(tailwindBase, './resolveConfig.js') resolve = require('./resolveConfig.js', tailwindBase)
} catch (_) { } catch (_) {
try { try {
const resolveConfig = importFrom( const resolveConfig = require('./lib/util/resolveConfig.js', tailwindBase)
tailwindBase, const defaultConfig = require('./stubs/defaultConfig.stub.js', tailwindBase)
'./lib/util/resolveConfig.js'
)
const defaultConfig = importFrom(
tailwindBase,
'./stubs/defaultConfig.stub.js'
)
resolve = (config) => resolveConfig([config, defaultConfig]) resolve = (config) => resolveConfig([config, defaultConfig])
} catch (_) {} } catch (_) {}
} }
})
return resolve(config) return resolve(config)
} }