-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): allow paths inside the workspace: protocol to start with ./ (
- Loading branch information
1 parent
8c82779
commit e5bc305
Showing
5 changed files
with
97 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
releases: | ||
"@yarnpkg/cli": prerelease | ||
"@yarnpkg/core": patch | ||
|
||
declined: | ||
- "@yarnpkg/plugin-compat" | ||
- "@yarnpkg/plugin-constraints" | ||
- "@yarnpkg/plugin-dlx" | ||
- "@yarnpkg/plugin-essentials" | ||
- "@yarnpkg/plugin-exec" | ||
- "@yarnpkg/plugin-file" | ||
- "@yarnpkg/plugin-git" | ||
- "@yarnpkg/plugin-github" | ||
- "@yarnpkg/plugin-http" | ||
- "@yarnpkg/plugin-init" | ||
- "@yarnpkg/plugin-interactive-tools" | ||
- "@yarnpkg/plugin-link" | ||
- "@yarnpkg/plugin-node-modules" | ||
- "@yarnpkg/plugin-npm" | ||
- "@yarnpkg/plugin-npm-cli" | ||
- "@yarnpkg/plugin-pack" | ||
- "@yarnpkg/plugin-patch" | ||
- "@yarnpkg/plugin-pnp" | ||
- "@yarnpkg/plugin-stage" | ||
- "@yarnpkg/plugin-typescript" | ||
- "@yarnpkg/plugin-version" | ||
- "@yarnpkg/plugin-workspace-tools" | ||
- "@yarnpkg/builder" | ||
- "@yarnpkg/doctor" | ||
- "@yarnpkg/pnpify" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
packages/acceptance-tests/pkg-tests-specs/sources/protocols/workspace.test.js
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
packages/acceptance-tests/pkg-tests-specs/sources/protocols/workspace.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import {PortablePath} from '@yarnpkg/fslib'; | ||
import {fs} from 'pkg-tests-core'; | ||
|
||
const {writeJson} = fs; | ||
|
||
describe(`Protocols`, () => { | ||
describe(`workspace:`, () => { | ||
test( | ||
`it should recognize prereleases in wildcard ranges`, | ||
makeTemporaryEnv( | ||
{ | ||
private: true, | ||
workspaces: [`docs`, `components`], | ||
}, | ||
async ({path, run, source}) => { | ||
await writeJson(`${path}/docs/package.json` as PortablePath, { | ||
name: `docs`, | ||
private: true, | ||
dependencies: { | ||
components: `workspace:*`, | ||
}, | ||
}); | ||
await writeJson(`${path}/components/package.json` as PortablePath, { | ||
name: `components`, | ||
version: `1.0.0-alpha.0`, | ||
}); | ||
|
||
await expect(run(`install`)).resolves.toBeTruthy(); | ||
}, | ||
), | ||
); | ||
|
||
test( | ||
`it should support relative paths (without ./)`, | ||
makeTemporaryMonorepoEnv({ | ||
workspaces: [`packages/*`], | ||
dependencies: { | ||
[`foo`]: `workspace:packages/foo`, | ||
}, | ||
}, { | ||
[`packages/foo`]: { | ||
name: `foo`, | ||
}, | ||
}, async ({path, run, source}) => { | ||
await expect(run(`install`)).resolves.toBeTruthy(); | ||
}) | ||
); | ||
|
||
test( | ||
`it should support relative paths (with ./)`, | ||
makeTemporaryMonorepoEnv({ | ||
workspaces: [`packages/*`], | ||
dependencies: { | ||
[`foo`]: `workspace:./packages/foo`, | ||
}, | ||
}, { | ||
[`packages/foo`]: { | ||
name: `foo`, | ||
}, | ||
}, async ({path, run, source}) => { | ||
await expect(run(`install`)).resolves.toBeTruthy(); | ||
}) | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters