Skip to content

Commit

Permalink
Merge branch 'release/6.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Apr 15, 2024
2 parents 0dae026 + 84d4737 commit 62f24ec
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 50 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [v6.0.1](https://github.com/studiometa/webpack-config/compare/6.0.0..6.0.1) (2024-04-15)

### Removed

- ⚠️ Remove the `meta link` command ([d255afe](https://github.com/studiometa/webpack-config/commit/d255afe))

## [v6.0.0](https://github.com/studiometa/webpack-config/compare/5.3.0..6.0.0) (2024-04-15)

### Removed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "studiometa/webpack-config",
"version": "6.0.0",
"version": "6.0.1",
"description": "PHP Helpers for @studiometa/webpack-config",
"type": "library",
"require": {
Expand Down
12 changes: 11 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
import { js, prettier } from '@studiometa/eslint-config';
import { globals } from '@studiometa/eslint-config/utils';

export default [...js, ...prettier];
export default [
...js,
...prettier,
{
files: ['packages/preset-*/**/*', 'packages/webpack-config/**/*'],
languageOptions: {
globals: globals.node,
},
},
];
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-root",
"version": "6.0.0",
"version": "6.0.1",
"private": true,
"type": "module",
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-demo",
"version": "6.0.0",
"version": "6.0.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-preset-markdown",
"version": "6.0.0",
"version": "6.0.1",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-prototyping/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-preset-prototyping",
"version": "6.0.0",
"version": "6.0.1",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-vue-2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-preset-vue-2",
"version": "6.0.0",
"version": "6.0.1",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-vue-3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-preset-vue-3",
"version": "6.0.0",
"version": "6.0.1",
"publishConfig": {
"access": "public"
},
Expand Down
33 changes: 0 additions & 33 deletions packages/webpack-config/bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/usr/bin/env node
import cac from 'cac';
import chalk from 'chalk';
import { cwd } from 'node:process';
import { symlinkSync, existsSync, readlinkSync, lstatSync } from 'node:fs';
import { resolve } from 'node:path';
import { createRequire } from 'node:module';
import { withTrailingSlash } from '../src/utils/index.js';

const require = createRequire(import.meta.url);
const { version, name } = require('../package.json');
Expand Down Expand Up @@ -47,35 +43,6 @@ cli
watch(options);
});

cli
.command('link <path>', 'Link the given folder to the given alias (default "@").')
.option('-a, --alias <name>', 'The alias name')
.action(async (path, { alias = '@' }) => {
const target = resolve(cwd(), path);
const symlink = resolve(cwd(), 'node_modules', alias);

if (existsSync(symlink)) {
const stat = lstatSync(symlink);

if (!stat.isSymbolicLink()) {
console.log(chalk.red(`A folder named "${alias}" already exists, choose another name with the "--link" parameter.`));
process.exit(1);
}

const existingSymlink = readlinkSync(symlink);
if (existingSymlink !== target) {
console.log(chalk.red(`A symlink named "${alias}" already exists, choose another name with the "--link" parameter.`));
process.exit(1);
} else {
console.log(`You can now use "${chalk.green(withTrailingSlash(alias))}" as an alias for the "${chalk.green(withTrailingSlash(path))}" folder.`);
return;
}
}

symlinkSync(target, symlink);
console.log(`You can now use "${chalk.green(withTrailingSlash(alias))}" as an alias for the "${chalk.green(withTrailingSlash(path))}" folder.`);
});

cli.help();
cli.version(fullVersion);

Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config",
"version": "6.0.0",
"version": "6.0.1",
"description": "A basic webpack config",
"type": "module",
"main": "src/index.js",
Expand Down

0 comments on commit 62f24ec

Please sign in to comment.