From d1108ee601d90c6496d0c43321fc27823c65823a Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 20 May 2021 14:00:04 +0200 Subject: [PATCH] Use Yarn PnPify --- .yarn/sdks/integrations.yml | 5 +++++ .yarn/sdks/prettier/index.js | 20 ++++++++++++++++++++ .yarn/sdks/prettier/package.json | 6 ++++++ 3 files changed, 31 insertions(+) create mode 100644 .yarn/sdks/integrations.yml create mode 100755 .yarn/sdks/prettier/index.js create mode 100644 .yarn/sdks/prettier/package.json diff --git a/.yarn/sdks/integrations.yml b/.yarn/sdks/integrations.yml new file mode 100644 index 00000000..76ed42ba --- /dev/null +++ b/.yarn/sdks/integrations.yml @@ -0,0 +1,5 @@ +# This file is automatically generated by PnPify. +# Manual changes will be lost! + +integrations: + - vscode diff --git a/.yarn/sdks/prettier/index.js b/.yarn/sdks/prettier/index.js new file mode 100755 index 00000000..db0cd170 --- /dev/null +++ b/.yarn/sdks/prettier/index.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node + +const {existsSync} = require(`fs`); +const {createRequire, createRequireFromPath} = require(`module`); +const {resolve} = require(`path`); + +const relPnpApiPath = "../../../.pnp.js"; + +const absPnpApiPath = resolve(__dirname, relPnpApiPath); +const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); + +if (existsSync(absPnpApiPath)) { + if (!process.versions.pnp) { + // Setup the environment to be able to require prettier/index.js + require(absPnpApiPath).setup(); + } +} + +// Defer to the real prettier/index.js your application uses +module.exports = absRequire(`prettier/index.js`); diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json new file mode 100644 index 00000000..8f5365d8 --- /dev/null +++ b/.yarn/sdks/prettier/package.json @@ -0,0 +1,6 @@ +{ + "name": "prettier", + "version": "2.3.0-pnpify", + "main": "./index.js", + "type": "commonjs" +}