Skip to content

Commit 4c8ce78

Browse files
author
Daniel Del Core
committed
removes unused flow parser
1 parent 991cbd3 commit 4c8ce78

File tree

7 files changed

+6534
-6871
lines changed

7 files changed

+6534
-6871
lines changed

.changeset/loud-jeans-rest.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@hypermod/fetcher': minor
3+
'@hypermod/core': minor
4+
'@hypermod/cli': minor
5+
---
6+
7+
Removes unused Flow parser, bumps babel presets/plugins, fixes a minor bug where transforms could be detected in preset strings

packages/cli/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
},
1919
"dependencies": {
2020
"@antfu/install-pkg": "^0.1.1",
21-
"@atlaskit/tokens": "^1.37.1",
2221
"@hypermod/core": "^0.2.3",
2322
"@hypermod/fetcher": "^0.6.0",
2423
"@hypermod/initializer": "^0.5.3",
@@ -33,8 +32,6 @@
3332
"live-plugin-manager": "^0.18.1",
3433
"lodash": "^4.17.21",
3534
"ora": "^5.4.1",
36-
"postcss": "^8.4.35",
37-
"postcss-less": "^6.0.0",
3835
"semver": "^7.3.5",
3936
"ts-node": "^10.9.1"
4037
},

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ program
3939
'-p, --parser <parser>',
4040
'Parser to use for parsing the source files',
4141
)
42-
.choices(['babel', 'babylon', 'flow', 'ts', 'tsx'])
42+
.choices(['babel', 'babylon', 'ts', 'tsx'])
4343
.default('tsx'),
4444
)
4545
.option(

packages/cli/src/main.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,12 @@ import { fetchConfigsForWorkspaces, getPackageJson } from './utils/file-system';
1616
import { getConfigPrompt, getMultiConfigPrompt } from './prompt';
1717

1818
const ExperimentalModuleLoader = () => ({
19-
install: async (packageName: string) => {
19+
install: async (packageName: string) =>
2020
await installPackage(packageName, {
2121
cwd: __dirname,
2222
packageManager: 'npm',
2323
additionalArgs: ['--force'],
24-
});
25-
await installPackage('postcss@^8.4.7', {
26-
cwd: __dirname,
27-
packageManager: 'npm',
28-
additionalArgs: ['--force'],
29-
});
30-
await installPackage('postcss-less@^6.0.0', {
31-
cwd: __dirname,
32-
packageManager: 'npm',
33-
additionalArgs: ['--force'],
34-
});
35-
},
24+
}),
3625
require: (packageName: string) => require(packageName),
3726
getInfo: (packageName: string) => {
3827
const entryPath = require.resolve(packageName);

packages/core/lib/Worker.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ function setup(entryPath, babel) {
6969
presets.push([presetEnv.default, { targets: { node: true } }]);
7070
}
7171

72-
presets.push(
73-
/\.tsx?$/.test(entryPath)
74-
? require('@babel/preset-typescript').default
75-
: require('@babel/preset-flow').default,
76-
);
72+
presets.push(require('@babel/preset-typescript').default);
7773

7874
require('@babel/register')({
7975
configFile: false,

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
1414
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
1515
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
16-
"@babel/preset-flow": "^7.13.13",
1716
"@babel/preset-typescript": "^7.23.0",
1817
"@babel/register": "^7.23.0",
1918
"@types/neo-async": "^2.6.0",

yarn.lock

Lines changed: 6523 additions & 6848 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)