Skip to content

Commit

Permalink
Revert "initial esm cli migration"
Browse files Browse the repository at this point in the history
This reverts commit fa45fcb.
  • Loading branch information
Daniel Del Core committed Sep 19, 2024
1 parent 6e1d67b commit 23bf978
Show file tree
Hide file tree
Showing 35 changed files with 111 additions and 85 deletions.
2 changes: 1 addition & 1 deletion community/@atlaskit__avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__avatar"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__breadcrumbs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__breadcrumbs"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__button"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__calendar"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__checkbox"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__icon"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__menu"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__popper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__popper"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__popup"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__progress-indicator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__progress-indicator"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__range/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__range"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__section-message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__section-message"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__side-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__side-navigation"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__spinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__spinner"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__tag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__tag"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__textarea"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__textfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__textfield"
Expand Down
2 changes: 1 addition & 1 deletion community/@atlaskit__toggle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@atlaskit__toggle"
Expand Down
2 changes: 1 addition & 1 deletion community/@emotion__monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/@emotion__monorepo"
Expand Down
2 changes: 1 addition & 1 deletion community/hypermod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.0.0",
"parcel": "^2.8.3",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/hypermod"
Expand Down
2 changes: 1 addition & 1 deletion community/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/javascript"
Expand Down
2 changes: 1 addition & 1 deletion community/memoize-one/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/memoize-one"
Expand Down
2 changes: 1 addition & 1 deletion community/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "^16.11.0",
"jest": "^29.0.0",
"prettier": "^2.0.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.2.2"
},
"repository": "https://github.com/hypermod-io/hypermod-community/tree/main/community/react"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"rimraf": "^2.6.3",
"semver": "^7.3.5",
"tar": "^6.1.0",
"ts-jest": "^29.0.0",
"ts-jest": "^29.2.5",
"ts-loader": "^6.2.1",
"ts-node": "^10.9.1",
"tslib": "^2.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/cli-alias/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@codeshift/cli",
"version": "0.23.0",
"type": "module",
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-alias/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from '@hypermod/cli';
import '@hypermod/cli';
4 changes: 1 addition & 3 deletions packages/cli-alias/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"baseUrl": ".",
"module": "NodeNext",
"moduleResolution": "NodeNext"
"baseUrl": "."
},
"include": ["src"],
"references": [
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/bin/hypermod-cli.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env node
export * from '../dist/index.js';
const path = require('path');

require(path.join('..', 'dist', 'index.js'));
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@hypermod/cli",
"version": "0.23.0",
"type": "module",
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
12 changes: 5 additions & 7 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { readFileSync } from 'fs';
import chalk from 'chalk';
import { Command, Option, CommanderError } from 'commander';

import main from './main.js';
import list from './list.js';
import init from './init.js';
import validate from './validate.js';
import { InvalidUserInputError, InvalidConfigError } from './errors.js';

const __dirname = path.dirname(new URL(import.meta.url).pathname);
import main from './main';
import list from './list';
import init from './init';
import validate from './validate';
import { InvalidUserInputError, InvalidConfigError } from './errors';

const packageJson = readFileSync(
path.join(__dirname, '..', 'package.json'),
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/list.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import chalk from 'chalk';
import { PluginManager } from 'live-plugin-manager';

import { fetchPackages } from './utils/fetch-package.js';
import { getHypermodPackageName } from './utils/package-names.js';
import { fetchPackages } from './utils/fetch-package';
import { getHypermodPackageName } from './utils/package-names';

export default async function list(packages: string[]) {
const packageManager = new PluginManager();
Expand Down
27 changes: 5 additions & 22 deletions packages/cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ import { installPackage } from '@antfu/install-pkg';
import * as core from '@hypermod/core';
import { fetchConfigAtPath } from '@hypermod/fetcher';

import { InvalidUserInputError } from './errors.js';
import { fetchPackages } from './utils/fetch-package.js';
import { mergeConfigs } from './utils/merge-configs.js';
import {
fetchConfigsForWorkspaces,
getPackageJson,
} from './utils/file-system.js';
import { getConfigPrompt, getMultiConfigPrompt } from './prompt.js';

const __dirname = path.dirname(new URL(import.meta.url).pathname);
import { InvalidUserInputError } from './errors';
import { fetchPackages } from './utils/fetch-package';
import { mergeConfigs } from './utils/merge-configs';
import { fetchConfigsForWorkspaces, getPackageJson } from './utils/file-system';
import { getConfigPrompt, getMultiConfigPrompt } from './prompt';

const ExperimentalModuleLoader = () => {
const getInfo = (packageName: string) => {
Expand Down Expand Up @@ -161,33 +156,21 @@ export default async function main(
*/
const configFilePath = await findUp([
'hypermod.config.js',
'hypermod.config.cjs',
'hypermod.config.mjs',
'hypermod.config.ts',
'hypermod.config.tsx',
'src/hypermod.config.js',
'src/hypermod.config.cjs',
'src/hypermod.config.mjs',
'src/hypermod.config.ts',
'src/hypermod.config.tsx',
'codemods/hypermod.config.js',
'codemods/hypermod.config.cjs',
'codemods/hypermod.config.mjs',
'codemods/hypermod.config.ts',
'codemods/hypermod.config.tsx',
'codeshift.config.js',
'codeshift.config.cjs',
'codeshift.config.mjs',
'codeshift.config.ts',
'codeshift.config.tsx',
'src/codeshift.config.js',
'src/codeshift.config.cjs',
'src/codeshift.config.mjs',
'src/codeshift.config.ts',
'src/codeshift.config.tsx',
'codemods/codeshift.config.js',
'codemods/codeshift.config.cjs',
'codemods/codeshift.config.mjs',
'codemods/codeshift.config.ts',
'codemods/codeshift.config.tsx',
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/fetch-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@hypermod/fetcher';
import { isValidConfig } from '@hypermod/validator';

import { getHypermodPackageName } from './package-names.js';
import { getHypermodPackageName } from './package-names';

export async function fetchPackages(
packageName: string,
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"baseUrl": ".",
"module": "NodeNext",
"moduleResolution": "NodeNext"
"baseUrl": "."
},
"include": ["src"],
"references": [
Expand Down
Loading

0 comments on commit 23bf978

Please sign in to comment.