Skip to content

Commit 06bd2d3

Browse files
committed
build fixes
1 parent 3d607a1 commit 06bd2d3

File tree

5 files changed

+103
-92
lines changed

5 files changed

+103
-92
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"@rollup/plugin-alias": "^3.1.2",
4545
"@rollup/plugin-babel": "^5.3.0",
4646
"@rollup/plugin-commonjs": "^17.1.0",
47+
"@rollup/plugin-json": "^6.1.0",
4748
"@rollup/plugin-node-resolve": "^11.2.0",
4849
"@types/fs-extra": "^9.0.1",
4950
"@types/jest": "^27",
@@ -57,6 +58,7 @@
5758
"rimraf": "^3.0.2",
5859
"rollup": "2.53.1",
5960
"rollup-plugin-peer-deps-external": "^2.2.4",
61+
"rollup-plugin-tsconfig-paths": "^1.5.2",
6062
"typescript": "~5.2.2"
6163
},
6264
"repository": {

packages/cubejs-client-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
],
3535
"license": "MIT",
3636
"devDependencies": {
37+
"@cubejs-backend/linter": "1.3.13",
3738
"@types/jest": "^29",
38-
"@types/ramda": "^0.27.34",
3939
"@types/moment-range": "^4.0.0",
40+
"@types/ramda": "^0.27.34",
4041
"@types/uuid": "^8.3.0",
4142
"babel-jest": "^29",
42-
"@cubejs-backend/linter": "1.3.13",
4343
"jest": "^29",
4444
"typescript": "~5.2.2"
4545
},

packages/cubejs-client-core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ export * from './Meta';
651651
export * from './SqlQuery';
652652
export * from './RequestError';
653653
export * from './ProgressResult';
654-
export * from './ResultSet';
654+
export { default as ResultSet } from './ResultSet';
655655
export * from './HttpTransport';
656656
export * from './utils';
657657
export * from './time';

rollup.config.js

Lines changed: 83 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1-
import babel from '@rollup/plugin-babel';
2-
import resolve from '@rollup/plugin-node-resolve';
3-
import commonjs from '@rollup/plugin-commonjs';
4-
import alias from '@rollup/plugin-alias';
5-
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
1+
import babel from "@rollup/plugin-babel";
2+
import resolve from "@rollup/plugin-node-resolve";
3+
import commonjs from "@rollup/plugin-commonjs";
4+
import alias from "@rollup/plugin-alias";
5+
import tsconfigPaths from "rollup-plugin-tsconfig-paths";
6+
import peerDepsExternal from "rollup-plugin-peer-deps-external";
7+
import json from '@rollup/plugin-json';
68

7-
const bundle = (name, globalName, { globals = {}, ...baseConfig }, umdConfig) => {
9+
const bundle = (
10+
name,
11+
globalName,
12+
{ globals = {}, ...baseConfig },
13+
umdConfig
14+
) => {
815
const baseUmdConfig = {
916
...(umdConfig || baseConfig),
1017
plugins: [
1118
commonjs({
12-
extensions: ['.js'],
19+
extensions: [".js"],
1320
}),
1421
resolve({
15-
extensions: ['.ts', '.js', '.json'],
16-
mainFields: ['browser', 'module', 'main'],
22+
extensions: [".ts", ".js", ".json"],
23+
mainFields: ["browser", "module", "main"],
1724
}),
1825
babel({
19-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
20-
exclude: ['node_modules/**', /\/core-js\//],
21-
babelHelpers: 'runtime',
26+
extensions: [".js", ".jsx", ".ts", ".tsx"],
27+
exclude: ["node_modules/**", /\/core-js\//],
28+
babelHelpers: "runtime",
2229
presets: [
23-
'@babel/preset-react',
24-
'@babel/preset-typescript',
30+
"@babel/preset-react",
31+
"@babel/preset-typescript",
2532
[
26-
'@babel/preset-env',
33+
"@babel/preset-env",
2734
{
2835
shippedProposals: true,
29-
useBuiltIns: 'usage',
36+
useBuiltIns: "usage",
3037
corejs: 3,
3138
},
3239
],
3340
],
3441
plugins: [
3542
[
36-
'@babel/plugin-transform-runtime',
43+
"@babel/plugin-transform-runtime",
3744
{
3845
corejs: false,
3946
helpers: true,
@@ -45,7 +52,7 @@ const bundle = (name, globalName, { globals = {}, ...baseConfig }, umdConfig) =>
4552
}),
4653
alias({
4754
entries: {
48-
'@cubejs-client/core': '../cubejs-client-core/dist/index.js',
55+
"@cubejs-client/core": "../cubejs-client-core/src/index.ts",
4956
},
5057
}),
5158
],
@@ -69,26 +76,34 @@ const bundle = (name, globalName, { globals = {}, ...baseConfig }, umdConfig) =>
6976
{
7077
...baseConfig,
7178
plugins: [
79+
json(),
80+
tsconfigPaths(),
81+
resolve({
82+
extensions: [".mjs", ".js", ".jsx", ".ts", ".tsx", ".json"],
83+
browser: false,
84+
preferBuiltins: true,
85+
}),
86+
commonjs(),
7287
peerDepsExternal(),
7388
babel({
74-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
75-
exclude: 'node_modules/**',
76-
babelHelpers: 'runtime',
89+
extensions: [".js", ".jsx", ".ts", ".tsx"],
90+
exclude: "node_modules/**",
91+
babelHelpers: "runtime",
7792
presets: [
78-
'@babel/preset-react',
79-
'@babel/preset-typescript',
93+
"@babel/preset-react",
94+
"@babel/preset-typescript",
8095
[
81-
'@babel/preset-env',
96+
"@babel/preset-env",
8297
{
8398
shippedProposals: true,
84-
useBuiltIns: 'usage',
99+
useBuiltIns: "usage",
85100
corejs: 3,
86101
},
87102
],
88103
],
89104
plugins: [
90105
[
91-
'@babel/plugin-transform-runtime',
106+
"@babel/plugin-transform-runtime",
92107
{
93108
corejs: false,
94109
helpers: true,
@@ -102,15 +117,22 @@ const bundle = (name, globalName, { globals = {}, ...baseConfig }, umdConfig) =>
102117
output: [
103118
{
104119
file: `packages/${name}/dist/${name}.js`,
105-
format: 'cjs',
120+
format: "cjs",
106121
sourcemap: true,
107-
}
122+
},
108123
],
109124
},
110125
// ES module (for bundlers) build.
111126
{
112127
...baseConfig,
113128
plugins: [
129+
tsconfigPaths(),
130+
resolve({
131+
extensions: [".mjs", ".js", ".jsx", ".ts", ".tsx", ".json"],
132+
browser: true,
133+
preferBuiltins: false,
134+
}),
135+
commonjs(),
114136
peerDepsExternal(),
115137
babel({
116138
extensions: ['.js', '.jsx', '.ts', '.tsx'],
@@ -134,41 +156,41 @@ const bundle = (name, globalName, { globals = {}, ...baseConfig }, umdConfig) =>
134156
};
135157

136158
export default bundle(
137-
'cubejs-client-core',
138-
'cubejs',
159+
"cubejs-client-core",
160+
"cubejs",
139161
{
140-
input: 'packages/cubejs-client-core/dist/src/index.js',
162+
input: "packages/cubejs-client-core/src/index.ts",
141163
},
142164
{
143-
input: 'packages/cubejs-client-core/dist/src/index.umd.js',
165+
input: 'packages/cubejs-client-core/src/index.umd.ts',
144166
}
145167
)
146-
.concat(
147-
bundle('cubejs-client-ws-transport', 'CubejsWebSocketTransport', {
148-
input: 'packages/cubejs-client-ws-transport/src/index.ts',
149-
})
150-
)
151-
.concat(
152-
bundle('cubejs-client-react', 'cubejsReact', {
153-
input: 'packages/cubejs-client-react/src/index.js',
154-
external: ['react', 'prop-types'],
155-
})
156-
)
157-
.concat(
158-
bundle('cubejs-client-vue', 'cubejsVue', {
159-
input: 'packages/cubejs-client-vue/src/index.js',
160-
external: ['vue'],
161-
globals: {
162-
vue: 'Vue',
163-
},
164-
})
165-
)
166-
.concat(
167-
bundle('cubejs-client-vue3', 'cubejsVue3', {
168-
input: 'packages/cubejs-client-vue3/src/index.js',
169-
external: ['vue'],
170-
globals: {
171-
vue: 'Vue',
172-
},
173-
})
174-
);
168+
.concat(
169+
bundle('cubejs-client-ws-transport', 'CubejsWebSocketTransport', {
170+
input: 'packages/cubejs-client-ws-transport/src/index.ts',
171+
})
172+
)
173+
.concat(
174+
bundle('cubejs-client-react', 'cubejsReact', {
175+
input: 'packages/cubejs-client-react/src/index.js',
176+
external: ['react', 'prop-types'],
177+
})
178+
)
179+
.concat(
180+
bundle('cubejs-client-vue', 'cubejsVue', {
181+
input: 'packages/cubejs-client-vue/src/index.js',
182+
external: ['vue'],
183+
globals: {
184+
vue: 'Vue',
185+
},
186+
})
187+
)
188+
.concat(
189+
bundle('cubejs-client-vue3', 'cubejsVue3', {
190+
input: 'packages/cubejs-client-vue3/src/index.js',
191+
external: ['vue'],
192+
globals: {
193+
vue: 'Vue',
194+
},
195+
})
196+
);

yarn.lock

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22924,6 +22924,13 @@ rollup-plugin-peer-deps-external@^2.2.4:
2292422924
resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz#8a420bbfd6dccc30aeb68c9bf57011f2f109570d"
2292522925
integrity sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==
2292622926

22927+
rollup-plugin-tsconfig-paths@^1.5.2:
22928+
version "1.5.2"
22929+
resolved "https://registry.yarnpkg.com/rollup-plugin-tsconfig-paths/-/rollup-plugin-tsconfig-paths-1.5.2.tgz#753bf970b14594b9ea1e93f3237eda380635f5b5"
22930+
integrity sha512-tyS7u2Md0eXKwbDfTuDDa1izciwqhOZsHzX7zYc5gKC1L7q5ozdSt+q1jjtD1dDqWyjrt8lZoiLtOQGhMHh1OQ==
22931+
dependencies:
22932+
typescript-paths "^1.5.1"
22933+
2292722934
2292822935
version "2.53.1"
2292922936
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.53.1.tgz#b60439efd1eb41bdb56630509bd99aae78b575d3"
@@ -24082,16 +24089,7 @@ string-length@^5.0.1:
2408224089
char-regex "^2.0.0"
2408324090
strip-ansi "^7.0.1"
2408424091

24085-
"string-width-cjs@npm:string-width@^4.2.0":
24086-
version "4.2.3"
24087-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
24088-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
24089-
dependencies:
24090-
emoji-regex "^8.0.0"
24091-
is-fullwidth-code-point "^3.0.0"
24092-
strip-ansi "^6.0.1"
24093-
24094-
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
24092+
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
2409524093
version "4.2.3"
2409624094
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
2409724095
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -24182,7 +24180,7 @@ string_decoder@~1.1.1:
2418224180
dependencies:
2418324181
safe-buffer "~5.1.0"
2418424182

24185-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
24183+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
2418624184
version "6.0.1"
2418724185
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
2418824186
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -24210,13 +24208,6 @@ strip-ansi@^5.2.0:
2421024208
dependencies:
2421124209
ansi-regex "^4.1.0"
2421224210

24213-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
24214-
version "6.0.1"
24215-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
24216-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
24217-
dependencies:
24218-
ansi-regex "^5.0.1"
24219-
2422024211
strip-ansi@^7.0.1, strip-ansi@^7.1.0:
2422124212
version "7.1.0"
2422224213
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -25241,6 +25232,11 @@ typedarray@^0.0.6:
2524125232
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
2524225233
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
2524325234

25235+
typescript-paths@^1.5.1:
25236+
version "1.5.1"
25237+
resolved "https://registry.yarnpkg.com/typescript-paths/-/typescript-paths-1.5.1.tgz#975cf5883915b24f9287315a8fa70b3b3451e32e"
25238+
integrity sha512-lYErSLCON2MSplVV5V/LBgD4UNjMgY3guATdFCZY2q1Nr6OZEu4q6zX/rYMsG1TaWqqQSszg6C9EU7AGWMDrIw==
25239+
2524425240
"typescript@>=3 < 6":
2524525241
version "5.7.3"
2524625242
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e"
@@ -26313,7 +26309,7 @@ workerpool@^9.2.0:
2631326309
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.2.0.tgz#f74427cbb61234708332ed8ab9cbf56dcb1c4371"
2631426310
integrity sha512-PKZqBOCo6CYkVOwAxWxQaSF2Fvb5Iv2fCeTP7buyWI2GiynWr46NcXSgK/idoV6e60dgCBfgYc+Un3HMvmqP8w==
2631526311

26316-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
26312+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
2631726313
version "7.0.0"
2631826314
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
2631926315
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -26339,15 +26335,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
2633926335
string-width "^4.1.0"
2634026336
strip-ansi "^6.0.0"
2634126337

26342-
wrap-ansi@^7.0.0:
26343-
version "7.0.0"
26344-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
26345-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
26346-
dependencies:
26347-
ansi-styles "^4.0.0"
26348-
string-width "^4.1.0"
26349-
strip-ansi "^6.0.0"
26350-
2635126338
wrap-ansi@^8.1.0:
2635226339
version "8.1.0"
2635326340
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)