Skip to content

Commit

Permalink
Fixes some Git installs (yarnpkg#1405)
Browse files Browse the repository at this point in the history
* Various fixes

* Version

* Refactors the configuration workflow

* Updates versions

* Updates versions

* Fixes

* Trimming escape codes doesnt actually work

* Upgrades clipanion

* Fixes yarn config

* Fixes searchbox enter

* Versions
  • Loading branch information
arcanis committed May 29, 2020
1 parent a5b0620 commit f7371b7
Show file tree
Hide file tree
Showing 33 changed files with 274 additions and 169 deletions.
91 changes: 45 additions & 46 deletions .pnp.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions .yarn/versions/7fb81f28.yml
@@ -0,0 +1,32 @@
releases:
"@yarnpkg/builder": prerelease
"@yarnpkg/cli": prerelease
"@yarnpkg/core": prerelease
"@yarnpkg/doctor": prerelease
"@yarnpkg/plugin-constraints": prerelease
"@yarnpkg/plugin-dlx": prerelease
"@yarnpkg/plugin-essentials": prerelease
"@yarnpkg/plugin-github": prerelease
"@yarnpkg/plugin-init": prerelease
"@yarnpkg/plugin-interactive-tools": prerelease
"@yarnpkg/plugin-node-modules": prerelease
"@yarnpkg/plugin-npm-cli": prerelease
"@yarnpkg/plugin-pack": prerelease
"@yarnpkg/plugin-patch": prerelease
"@yarnpkg/plugin-pnp": prerelease
"@yarnpkg/plugin-stage": prerelease
"@yarnpkg/plugin-version": prerelease
"@yarnpkg/plugin-workspace-tools": prerelease
"@yarnpkg/pnp": prerelease
"@yarnpkg/shell": prerelease

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-exec"
- "@yarnpkg/plugin-file"
- "@yarnpkg/plugin-git"
- "@yarnpkg/plugin-http"
- "@yarnpkg/plugin-link"
- "@yarnpkg/plugin-npm"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/pnpify"
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -29,7 +29,7 @@
"@yarnpkg/eslint-config": "workspace:^0.0.0",
"@yarnpkg/pnpify": "workspace:^2.0.0-rc.22",
"babel-jest": "^24.5.0",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"eslint": "^6.8.0",
"eslint-plugin-arca": "^0.9.0",
"eslint-plugin-react": "^7.14.3",
Expand All @@ -44,6 +44,9 @@
"core-js": {
"built": false
},
"core-js-pure": {
"built": false
},
"date-fns": {
"built": false
},
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby/src/components/search/SearchBox.js
Expand Up @@ -83,7 +83,7 @@ const RawSearchBox = ({currentRefinement, refine, autoFocus}) => {
e.preventDefault();
e.stopPropagation();

navigate(`/package?${currentRefinement}`);
navigate(`/package/${currentRefinement}`);
};

return (
Expand All @@ -106,7 +106,7 @@ const RawSearchBox = ({currentRefinement, refine, autoFocus}) => {
size="1"
/>
<SubmitButton type="submit" title="Submit your search query."><IoIosSearch/></SubmitButton>
<ResetButton type="reset" title="Clear the search query." onClick={() => refine('')}><IoIosClose/></ResetButton>
<ResetButton type="reset" title="Clear the search query." onClick={() => refine(``)}><IoIosClose/></ResetButton>
</SearchForm>
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-constraints/package.json
Expand Up @@ -9,7 +9,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"inquirer": "^6.2.0",
"lodash": "^4.17.15",
"node-emoji": "^1.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-dlx/package.json
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"@yarnpkg/json-proxy": "workspace:^2.0.0-rc.7",
"clipanion": "^2.1.5"
"clipanion": "^2.4.0"
},
"peerDependencies": {
"@yarnpkg/cli": "^2.0.0-rc.33",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-essentials/package.json
Expand Up @@ -7,7 +7,7 @@
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"@yarnpkg/json-proxy": "workspace:^2.0.0-rc.7",
"@yarnpkg/parsers": "workspace:^2.0.0-rc.11",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"inquirer": "^6.2.0",
"lodash": "^4.17.15",
"semver": "^7.1.2",
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-github/sources/index.ts
Expand Up @@ -16,7 +16,6 @@ const plugin: Plugin<GitHooks> = {
try {
return await fetcher.fetch(locator, opts);
} catch (error) {
console.log(error);
return null;
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-init/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5"
"clipanion": "^2.4.0"
},
"peerDependencies": {
"@yarnpkg/cli": "^2.0.0-rc.33",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-interactive-tools/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/libui": "workspace:^2.0.0-rc.7",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"diff": "^4.0.1",
"ink": "^2.3.0",
"react": "^16.13.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-node-modules/package.json
Expand Up @@ -10,7 +10,7 @@
"@yarnpkg/pnp": "workspace:^2.0.0-rc.20",
"@yarnpkg/pnpify": "workspace:^2.0.0-rc.22",
"@zkochan/cmd-shim": "^4.3.0",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"micromatch": "^4.0.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-npm-cli/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"inquirer": "^6.2.0",
"semver": "^7.1.2",
"ssri": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-pack/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"micromatch": "^4.0.2",
"tar-stream": "^2.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-patch/package.json
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"@yarnpkg/libzip": "workspace:^2.0.0-rc.11",
"clipanion": "^2.1.5"
"clipanion": "^2.4.0"
},
"peerDependencies": {
"@yarnpkg/cli": "^2.0.0-rc.33",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-pnp/package.json
Expand Up @@ -8,7 +8,7 @@
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"@yarnpkg/plugin-stage": "workspace:^2.0.0-rc.15",
"@yarnpkg/pnp": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"semver": "^7.1.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-stage/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5"
"clipanion": "^2.4.0"
},
"peerDependencies": {
"@yarnpkg/cli": "^2.0.0-rc.33",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-version/package.json
Expand Up @@ -7,7 +7,7 @@
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"@yarnpkg/libui": "workspace:^2.0.0-rc.7",
"@yarnpkg/parsers": "workspace:^2.0.0-rc.11",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"ink": "^2.3.0",
"react": "^16.13.1",
"semver": "^7.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-version/sources/commands/version/check.tsx
Expand Up @@ -114,9 +114,9 @@ export default class VersionApplyCommand extends Command<CommandContext> {
<Box>
{strategies.map(strategy => {
if (strategy === decision) {
return <Box key={strategy} paddingLeft={2}><Color green></Color> {strategy}</Box>;
return <Box key={strategy} paddingLeft={2}><Color green> </Color> {strategy} </Box>;
} else {
return <Box key={strategy} paddingLeft={2}><Color yellow></Color> {strategy}</Box>;
return <Box key={strategy} paddingLeft={2}><Color yellow> </Color> {strategy} </Box>;
}
})}
</Box>
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-workspace-tools/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "./sources/index.ts",
"dependencies": {
"@yarnpkg/fslib": "workspace:^2.0.0-rc.20",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"p-limit": "^2.2.0",
"yup": "^0.27.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-builder/package.json
Expand Up @@ -14,7 +14,7 @@
"babel-loader": "^8.0.6",
"babel-plugin-lazy-import": "arcanis/babel-plugin-lazy-import",
"chalk": "^3.0.0",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"filesize": "^4.1.2",
"pnp-webpack-plugin": "^1.4.3",
"semver": "^7.1.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/yarnpkg-builder/sources/commands/build/bundle.ts
Expand Up @@ -51,7 +51,8 @@ export default class BuildBundleCommand extends Command {
async execute() {
const basedir = process.cwd();
const portableBaseDir = npath.toPortablePath(basedir);
const configuration = new Configuration(portableBaseDir, portableBaseDir, new Map());

const configuration = Configuration.create(portableBaseDir);

const plugins = findPlugins({basedir, profile: this.profile, plugins: this.plugins.map(plugin => path.resolve(plugin))});
const modules = [...getDynamicLibs().keys()].concat(plugins);
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-builder/sources/commands/build/plugin.ts
Expand Up @@ -36,7 +36,7 @@ export default class BuildPluginCommand extends Command {
async execute() {
const basedir = process.cwd();
const portableBaseDir = npath.toPortablePath(basedir);
const configuration = new Configuration(portableBaseDir, portableBaseDir, new Map());
const configuration = Configuration.create(portableBaseDir);

const {name: rawName} = require(`${basedir}/package.json`);
const name = getNormalizedName(rawName);
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-cli/package.json
Expand Up @@ -25,7 +25,7 @@
"@yarnpkg/plugin-pnp": "workspace:^2.0.0-rc.21",
"@yarnpkg/shell": "workspace:^2.0.0-rc.11",
"chalk": "^3.0.0",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"fromentries": "^1.2.0",
"semver": "^7.1.2",
"yup": "^0.27.0"
Expand Down
1 change: 1 addition & 0 deletions packages/yarnpkg-cli/sources/main.ts
Expand Up @@ -57,6 +57,7 @@ export async function main({binaryVersion, pluginConfiguration}: {binaryVersion:
// Since we only care about a few very specific settings (yarn-path and ignore-path) we tolerate extra configuration key.
// If we didn't, we wouldn't even be able to run `yarn config` (which is recommended in the invalid config error message)
const configuration = await Configuration.find(npath.toPortablePath(process.cwd()), pluginConfiguration, {
usePath: true,
strict: false,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-core/package.json
Expand Up @@ -13,7 +13,7 @@
"@yarnpkg/shell": "workspace:^2.0.0-rc.11",
"camelcase": "^5.3.1",
"chalk": "^3.0.0",
"clipanion": "^2.1.5",
"clipanion": "^2.4.0",
"cross-spawn": "7.0.3",
"diff": "^4.0.1",
"globby": "^10.0.1",
Expand Down

0 comments on commit f7371b7

Please sign in to comment.