diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cd3b65b..29f6e233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,15 +27,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] node-version: [10.x, 12.x] - exclude: - - os: macos-latest - node-version: 10.x - - os: macos-latest - node-version: 13.x - - os: windows-latest - node-version: 10.x - - os: windows-latest - node-version: 13.x + steps: - name: Echo env variables diff --git a/tools/plugin-pnp.js b/tools/plugin-pnp.js index ce6dc974..2e96ba49 100644 --- a/tools/plugin-pnp.js +++ b/tools/plugin-pnp.js @@ -1,6 +1,3 @@ -const fs = require(`fs`); -const path = require(`path`); - const origStr = ` function findPackageLocator(location) { let relativeLocation = normalizePath(fslib_2.ppath.relative(runtimeState.basePath, location));`; const fixedStr = ` function findPackageLocator(location) { @@ -15,13 +12,14 @@ const fixedStr = ` function findPackageLocator(location) { module.exports = { name: `plugin-pnp`, - factory: () => ({ + factory: (require) => ({ hooks: { afterAllInstalled(project) { - const pnpFile = path.join(project.cwd, `.pnp.js`); - const pnpContent = fs.readFileSync(pnpFile, `utf-8`); + const fs = require('@yarnpkg/fslib'); + const pnpFile = fs.ppath.join(project.cwd, `.pnp.js`); + const pnpContent = fs.xfs.readFileSync(pnpFile, `utf-8`); const fixed = pnpContent.replace(origStr, fixedStr); - fs.writeFileSync(pnpFile, fixed, `utf-8`); + fs.xfs.writeFileSync(pnpFile, fixed, `utf-8`); }, }, }),