@modern-js/types 3.0.0-alpha.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export * from './babel';
2
-
3
1
  export type InternalPlugins = Record<
4
2
  string,
5
3
  string | { path: string; forced?: boolean }
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.0.0-alpha.1",
18
+ "version": "3.0.0",
19
19
  "types": "./index.d.ts",
20
20
  "exports": {
21
21
  ".": {
@@ -24,7 +24,6 @@
24
24
  },
25
25
  "./server": {
26
26
  "types": "./server/index.d.ts",
27
- "jsnext:source": "./server/index.d.ts",
28
27
  "default": "./server/index.d.ts"
29
28
  }
30
29
  },
@@ -33,9 +32,6 @@
33
32
  ".": [
34
33
  "./index.d.ts"
35
34
  ],
36
- "hoist-non-react-statics": [
37
- "./packages/hoist-non-react-statics.d.ts"
38
- ],
39
35
  "server": [
40
36
  "./server/index.d.ts"
41
37
  ]
package/common/babel.d.ts DELETED
@@ -1,80 +0,0 @@
1
- import type {
2
- PluginItem as BabelPlugin,
3
- TransformOptions as BabelTransformOptions,
4
- } from '@babel/core';
5
-
6
- export type {
7
- TransformOptions as BabelTransformOptions,
8
- PluginItem as BabelPlugin,
9
- PluginOptions as BabelPluginOptions,
10
- } from '@babel/core';
11
-
12
- export type PresetEnvOptions = Partial<{
13
- targets:
14
- | string
15
- | string[]
16
- | Record<string, string>
17
- | Partial<{
18
- esmodules: boolean;
19
- node: string | 'current';
20
- safari: string | 'tp';
21
- browsers: string[];
22
- }>;
23
- bugfixes: boolean;
24
- spec: boolean;
25
- loose: boolean;
26
- modules: 'amd' | 'umd' | 'systemjs' | 'commonjs' | 'cjs' | 'auto' | false;
27
- debug: boolean;
28
- include: string[];
29
- exclude: string[];
30
- useBuiltIns: 'usage' | 'entry' | false;
31
- corejs: string | { version: string; proposals: boolean };
32
- forceAllTransforms: boolean;
33
- configPath: string;
34
- ignoreBrowserslistConfig: boolean;
35
- browserslistEnv: string;
36
- shippedProposals: boolean;
37
- }>;
38
-
39
- export interface SharedBabelPresetReactOptions {
40
- development?: boolean;
41
- throwIfNamespace?: boolean;
42
- }
43
-
44
- export interface AutomaticRuntimePresetReactOptions
45
- extends SharedBabelPresetReactOptions {
46
- runtime?: 'automatic';
47
- importSource?: string;
48
- }
49
-
50
- export interface ClassicRuntimePresetReactOptions
51
- extends SharedBabelPresetReactOptions {
52
- runtime?: 'classic';
53
- pragma?: string;
54
- pragmaFrag?: string;
55
- useBuiltIns?: boolean;
56
- useSpread?: boolean;
57
- }
58
-
59
- export type PresetReactOptions =
60
- | AutomaticRuntimePresetReactOptions
61
- | ClassicRuntimePresetReactOptions;
62
-
63
- export type BabelConfigUtils = {
64
- addPlugins: (plugins: BabelPlugin[]) => void;
65
- addPresets: (presets: BabelPlugin[]) => void;
66
- addIncludes: (includes: string | RegExp | (string | RegExp)[]) => void;
67
- addExcludes: (excludes: string | RegExp | (string | RegExp)[]) => void;
68
- removePlugins: (plugins: string | string[]) => void;
69
- removePresets: (presets: string | string[]) => void;
70
- modifyPresetEnvOptions: (options: PresetEnvOptions) => void;
71
- modifyPresetReactOptions: (options: PresetReactOptions) => void;
72
- };
73
- export type BabelConfig =
74
- | BabelTransformOptions
75
- | ((
76
- config: BabelTransformOptions,
77
- utils: BabelConfigUtils,
78
- ) => BabelTransformOptions | void);
79
-
80
- export type BabelOptions = BabelTransformOptions;