@cedarjs/babel-config 6.0.0-canary.2639 → 6.0.0-canary.2641
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/dist/api.d.ts +5 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +9 -5
- package/package.json +3 -3
package/dist/api.d.ts
CHANGED
|
@@ -11,11 +11,13 @@ export declare const getApiSideBabelPlugins: ({ forVite, projectIsEsm, }?: {
|
|
|
11
11
|
projectIsEsm?: boolean | undefined;
|
|
12
12
|
}) => ([PluginTarget, PluginOptions, string | undefined] | [PluginTarget, PluginOptions])[];
|
|
13
13
|
export declare const getApiSideBabelConfigPath: () => string | undefined;
|
|
14
|
-
export declare const getApiSideBabelOverrides: ({ projectIsEsm, forJest, }?: {
|
|
14
|
+
export declare const getApiSideBabelOverrides: ({ forVite, projectIsEsm, forJest, }?: {
|
|
15
|
+
forVite?: boolean | undefined;
|
|
15
16
|
projectIsEsm?: boolean | undefined;
|
|
16
17
|
forJest?: boolean | undefined;
|
|
17
18
|
}) => TransformOptions[];
|
|
18
|
-
export declare const getApiSideDefaultBabelConfig: ({ projectIsEsm, forJest, }?: {
|
|
19
|
+
export declare const getApiSideDefaultBabelConfig: ({ forVite, projectIsEsm, forJest, }?: {
|
|
20
|
+
forVite?: boolean | undefined;
|
|
19
21
|
projectIsEsm?: boolean | undefined;
|
|
20
22
|
forJest?: boolean | undefined;
|
|
21
23
|
}) => {
|
|
@@ -27,6 +29,6 @@ export declare const getApiSideDefaultBabelConfig: ({ projectIsEsm, forJest, }?:
|
|
|
27
29
|
ignore: string[];
|
|
28
30
|
};
|
|
29
31
|
export declare const registerApiSideBabelHook: ({ plugins, ...rest }?: RegisterHookOptions) => void;
|
|
30
|
-
export declare const transformWithBabel: (sourceCode: string, filename: string, plugins: TransformOptions["plugins"], sourceMaps?: TransformOptions["sourceMaps"]) => Promise<import("@babel/core").BabelFileResult | null>;
|
|
32
|
+
export declare const transformWithBabel: (sourceCode: string, filename: string, plugins: TransformOptions["plugins"], sourceMaps?: TransformOptions["sourceMaps"], forVite?: boolean) => Promise<import("@babel/core").BabelFileResult | null>;
|
|
31
33
|
export {};
|
|
32
34
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMhF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAYtD,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC,eAAO,MAAM,sBAAsB,GACjC;;CAAoC,KAqBf,gBAAgB,CAAC,SAAS,CAChD,CAAA;AAKD,MAAM,MAAM,UAAU,GAAG,WAAW,EAAE,CAAA;AACtC,KAAK,WAAW,GACZ,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC,GACjD,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;AAEjC,eAAO,MAAM,sBAAsB,GAAI;;;CAGjC,0FAgGL,CAAA;AAED,eAAO,MAAM,yBAAyB,0BAOrC,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMhF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAYtD,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC,eAAO,MAAM,sBAAsB,GACjC;;CAAoC,KAqBf,gBAAgB,CAAC,SAAS,CAChD,CAAA;AAKD,MAAM,MAAM,UAAU,GAAG,WAAW,EAAE,CAAA;AACtC,KAAK,WAAW,GACZ,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC,GACjD,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;AAEjC,eAAO,MAAM,sBAAsB,GAAI;;;CAGjC,0FAgGL,CAAA;AAED,eAAO,MAAM,yBAAyB,0BAOrC,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI;;;;CAInC,KAwBgB,gBAAgB,EACrC,CAAA;AAED,eAAO,MAAM,4BAA4B,GAAI;;;;CAIvC;;;;;;;CASL,CAAA;AAGD,eAAO,MAAM,wBAAwB,GAAI,uBAGtC,mBAAwB,SAe1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,UAAU,MAAM,EAChB,SAAS,gBAAgB,CAAC,SAAS,CAAC,EACpC,aAAY,gBAAgB,CAAC,YAAY,CAAY,EACrD,iBAAe,0DAoBhB,CAAA"}
|
package/dist/api.js
CHANGED
|
@@ -157,6 +157,7 @@ const getApiSideBabelConfigPath = () => {
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
const getApiSideBabelOverrides = ({
|
|
160
|
+
forVite = false,
|
|
160
161
|
projectIsEsm = false,
|
|
161
162
|
forJest = false
|
|
162
163
|
} = {}) => {
|
|
@@ -175,8 +176,9 @@ const getApiSideBabelOverrides = ({
|
|
|
175
176
|
]
|
|
176
177
|
]
|
|
177
178
|
},
|
|
178
|
-
// Add import names and paths to job definitions
|
|
179
|
-
|
|
179
|
+
// Add import names and paths to job definitions. Vite uses
|
|
180
|
+
// cedarjsJobPathInjectorPlugin instead.
|
|
181
|
+
!forVite && {
|
|
180
182
|
// match */api/src/jobs/*.js|ts
|
|
181
183
|
test: /.+api(?:[\\|/])src(?:[\\|/])jobs(?:[\\|/]).+.(?:js|ts)$/,
|
|
182
184
|
plugins: [[import_babel_plugin_redwood_job_path_injector.default]]
|
|
@@ -185,13 +187,14 @@ const getApiSideBabelOverrides = ({
|
|
|
185
187
|
return overrides;
|
|
186
188
|
};
|
|
187
189
|
const getApiSideDefaultBabelConfig = ({
|
|
190
|
+
forVite = false,
|
|
188
191
|
projectIsEsm = false,
|
|
189
192
|
forJest = false
|
|
190
193
|
} = {}) => {
|
|
191
194
|
return {
|
|
192
195
|
presets: getApiSideBabelPresets(),
|
|
193
|
-
plugins: getApiSideBabelPlugins({ projectIsEsm }),
|
|
194
|
-
overrides: getApiSideBabelOverrides({ projectIsEsm, forJest }),
|
|
196
|
+
plugins: getApiSideBabelPlugins({ forVite, projectIsEsm }),
|
|
197
|
+
overrides: getApiSideBabelOverrides({ forVite, projectIsEsm, forJest }),
|
|
195
198
|
extends: getApiSideBabelConfigPath(),
|
|
196
199
|
babelrc: false,
|
|
197
200
|
ignore: ["node_modules"]
|
|
@@ -215,8 +218,9 @@ const registerApiSideBabelHook = ({
|
|
|
215
218
|
...rest
|
|
216
219
|
});
|
|
217
220
|
};
|
|
218
|
-
const transformWithBabel = async (sourceCode, filename, plugins, sourceMaps = "inline") => {
|
|
221
|
+
const transformWithBabel = async (sourceCode, filename, plugins, sourceMaps = "inline", forVite = false) => {
|
|
219
222
|
const defaultOptions = getApiSideDefaultBabelConfig({
|
|
223
|
+
forVite,
|
|
220
224
|
projectIsEsm: (0, import_project_config.projectSideIsEsm)("api")
|
|
221
225
|
});
|
|
222
226
|
const result = (0, import_core.transformAsync)(sourceCode, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/babel-config",
|
|
3
|
-
"version": "6.0.0-canary.
|
|
3
|
+
"version": "6.0.0-canary.2641",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@babel/preset-typescript": "7.29.7",
|
|
36
36
|
"@babel/register": "7.29.7",
|
|
37
37
|
"@babel/traverse": "7.29.7",
|
|
38
|
-
"@cedarjs/project-config": "6.0.0-canary.
|
|
38
|
+
"@cedarjs/project-config": "6.0.0-canary.2641",
|
|
39
39
|
"babel-plugin-auto-import": "1.1.0",
|
|
40
40
|
"babel-plugin-graphql-tag": "3.3.0",
|
|
41
41
|
"babel-plugin-module-resolver": "5.0.3",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "5.9.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@cedarjs/framework-tools": "6.0.0-canary.
|
|
47
|
+
"@cedarjs/framework-tools": "6.0.0-canary.2641",
|
|
48
48
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
49
49
|
"@types/babel-plugin-tester": "11.0.0",
|
|
50
50
|
"@types/babel__core": "7.20.5",
|