import { Plugin } from "@yarnpkg/core" ; import fs from "fs" ; import { patchFs } from "@yarnpkg/fslib" ; import { PackageYamlFS } from "./PackageYamlFS" ; let fsPatched = false ; const patchFileSystem = ( realFs ) => { if ( ! fsPatched ) { const patchedFs = new PackageYamlFS ( { ... realFs } ) ; patchFs ( fs , patchedFs ) ; fsPatched = true ; } } ; patchFileSystem ( fs ) ; const plugin = { } ; export default plugin ;