Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-exported memb #65

Open
wants to merge 128 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
3040fbf
test-exported memb
yinstardev Nov 27, 2024
c6b7739
test-exported memb lintfix
yinstardev Nov 27, 2024
4a2b38b
test-exported memb lintfix1
yinstardev Nov 27, 2024
1fa1acf
export from diff
yinstardev Nov 27, 2024
4aa68a8
export from diff lint
yinstardev Nov 27, 2024
dd281c0
export from package export
yinstardev Nov 27, 2024
fb7bf85
export basic util fn
yinstardev Nov 27, 2024
cfaa3da
export basic util fn 1
yinstardev Nov 27, 2024
9ad6a48
export basic util fn 2
yinstardev Nov 27, 2024
ef840c9
export basic util fn 2
yinstardev Nov 27, 2024
d98cfaa
get lb url a1
yinstardev Dec 2, 2024
fe02abc
get lb url a2
yinstardev Dec 2, 2024
fc49851
get lb url a3
yinstardev Dec 2, 2024
34af2bf
get lb url a3
yinstardev Dec 2, 2024
b7e9e2f
get lb url a3
yinstardev Dec 3, 2024
04bc31e
get lb url a3del
yinstardev Dec 3, 2024
cec84af
SCAL-233454-exp style for ios bug
yinstardev Dec 12, 2024
f88be61
SCAL-233454-exp style for ios bug2
yinstardev Dec 12, 2024
13d2fb1
SCAL-233454-exp style for ios bug lint err
yinstardev Dec 12, 2024
3b0e8b1
SCAL-233454-exp style for ios bug lint err2
yinstardev Dec 12, 2024
de829ba
SCAL-233454-exp style for ios bug lint err3
yinstardev Dec 12, 2024
b0517a6
SCAL-233454-exp enableFlipTooltipcontextMenu by default true
yinstardev Dec 15, 2024
d9eda8f
SCAL-233454-exp enableFlipTooltipcontextMenu by default true
yinstardev Dec 15, 2024
ed71af1
SCAL-233454-exp jshandler
yinstardev Dec 31, 2024
2edcf97
SCAL-233454-exp uts
yinstardev Jan 2, 2025
d865b9e
SCAL-233454-exp uts
yinstardev Jan 2, 2025
c929941
SCAL-233454-exp lintfixes
yinstardev Jan 2, 2025
ecce052
SCAL-233454-exp lintfix
yinstardev Jan 2, 2025
40f3272
SCAL-233454-exp cov-test
yinstardev Jan 2, 2025
e91f99e
SCAL-233454-exp remove-hello-export
yinstardev Jan 2, 2025
b3d07c0
SCAL-233454-exp lint-x
yinstardev Jan 2, 2025
b965dba
SCAL-233454-exp lint-x
yinstardev Jan 2, 2025
fe5dee7
SCAL-233454-exp init for native
yinstardev Jan 2, 2025
290d28f
SCAL-233454-exp linterrors
yinstardev Jan 2, 2025
0921671
SCAL-233454-exp linterrors
yinstardev Jan 2, 2025
47663ba
SCAL-233454-exp cross-fetch exp
yinstardev Jan 3, 2025
4989128
SCAL-233454-exp temp-testcases skip
yinstardev Jan 3, 2025
5dd9799
SCAL-233454-exp test-new-parent-class
Jan 10, 2025
76e9201
SCAL-233454-exp test-new-parent-class
Jan 10, 2025
b48dd2e
SCAL-233454-exp test-new-parent-class1
Jan 10, 2025
a862a97
SCAL-233454-exp test-new-parent-class1
Jan 10, 2025
6ce45d4
Merge branch 'main' into SCAL-233454-exp
yinstardev Jan 10, 2025
3d705e4
SCAL-233454-exp lint-errors1
Jan 10, 2025
061e580
SCAL-233454-exp lint-errors2
Jan 10, 2025
f061cb0
SCAL-233454-exp lint-errors3
Jan 10, 2025
78cba64
SCAL-233454-exp lint-errors4
Jan 10, 2025
0c45e26
SCAL-233454-exp lint-errors4
Jan 10, 2025
b88ff8e
SCAL-233454-exp test-failures
Jan 10, 2025
8792276
SCAL-233454-exp removing-logic-test-init
Jan 13, 2025
e4fcf55
SCAL-233454-exp removing-logic-test-init-lint
Jan 13, 2025
dcb0573
SCAL-233454-exp removing-logic-test-init-lint
Jan 13, 2025
c86414e
SCAL-233454-exp removing-logic-test-init-lint
Jan 13, 2025
cfdae9f
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
d204736
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
3238286
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
b8f3ffc
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
e82c089
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
c5c1aac
SCAL-233454-exp adding index.mobil.ts
Jan 13, 2025
69c414f
SCAL-233454-exp adding index.mobil.ts build input
Jan 13, 2025
d843137
SCAL-233454-exp adding index.mobil.ts build input types
Jan 13, 2025
f7aba47
SCAL-233454-exp remove-basets extra
Jan 14, 2025
c068d02
SCAL-233454-exp remove-basets extra
Jan 14, 2025
8fc53bb
SCAL-233454-exp remove-basets extra
Jan 14, 2025
7139f5a
SCAL-233454-exp remove-basets extra
Jan 14, 2025
9dd17c7
SCAL-233454-exp remove-basets extra
Jan 14, 2025
31827ca
SCAL-233454-exp remove-basets extra
Jan 14, 2025
63babca
SCAL-233454-exp adding pollyfill fetch
Jan 14, 2025
bd4c380
SCAL-233454-exp adding pollyfill fetch
Jan 14, 2025
78cb606
SCAL-233454-exp adding pollyfill fetch
Jan 14, 2025
fbc4088
SCAL-233454-exp checking-mixpanel-error
Jan 14, 2025
ce07d1c
SCAL-233454-exp checking-mixpanel-error
Jan 14, 2025
94dd756
SCAL-233454-exp checking-mixpanel-error
Jan 14, 2025
d71ed36
SCAL-233454-exp checking-mixpanel-error
Jan 14, 2025
8c37a65
SCAL-233454-exp removing-polyfills and adding initMobile
Jan 15, 2025
73502da
SCAL-233454-exp removing-polyfills and adding initMobile
Jan 15, 2025
8128131
SCAL-233454-exp overriding tsc outdir in dist
Jan 15, 2025
2127e13
SCAL-233454-exp overriding tsc outdir in dist
Jan 15, 2025
cdf1fea
SCAL-233454-exp moduleresolution for /mobile
Jan 15, 2025
e84cabe
SCAL-233454-exp moduleresolution as node testing
Jan 15, 2025
6a54a52
SCAL-233454-exp adding d.ts to direclty dist/
Jan 15, 2025
6a2cbb2
SCAL-233454-exp adding rollup compoptions for export to work
Jan 15, 2025
cb6ca1d
SCAL-233454-exp moduleResolution trying with 'bundler'
Jan 15, 2025
a53d7b5
SCAL-233454-exp using 'node' moduleResolution previous was bundler
Jan 15, 2025
cf18e9b
SCAL-233454-exp mapping import to esm build and no module and resolver
Jan 15, 2025
36e4eeb
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
9e0cf4b
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
b8bca8e
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
554fb24
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
acaa2cc
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
bf5eb4f
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
d8f89f7
SCAL-233454-exp removing all extra config and checking
Jan 16, 2025
c5fec67
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
6778e94
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
a82c79e
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
26494dd
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
4c24b6e
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
3a44e53
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
e43fffe
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
bbaf2c0
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
713de5b
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
8b3f596
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
29b7188
SCAL-233454-exp removing all extra config and checking
Jan 17, 2025
0397d24
SCAL-233454-exp testing with liveboardMobile embed class
Jan 17, 2025
cc60162
SCAL-233454-exp testing with liveboardMobile embed class
Jan 17, 2025
162ab67
SCAL-233454-exp testing with liveboardMobile embed class
Jan 17, 2025
ec8072b
SCAL-233454-exp setting-up embedconfig
Jan 17, 2025
ab29f73
SCAL-233454-exp set-embed-config
Jan 17, 2025
ba26c21
SCAL-233454-exp init authEE
Jan 20, 2025
d87868e
SCAL-233454-exp init authEE
Jan 20, 2025
859f87f
SCAL-233454-exp mobilembed from nativembed
Jan 20, 2025
2515155
SCAL-233454-exp mobilembed from nativembed
Jan 20, 2025
d481ed8
SCAL-233454-exp conditional imports
Jan 21, 2025
712993c
SCAL-233454-exp conditional imports lint error
Jan 21, 2025
54e2d64
SCAL-233454-exp conditional imports lint error '='
Jan 21, 2025
f5f6924
SCAL-233454-exp making init sync again
Jan 21, 2025
93e601a
SCAL-233454-exp forgot executing anon fn
Jan 21, 2025
269b0c6
SCAL-233454-exp removing extra packages
Jan 21, 2025
61ff84a
SCAL-233454-exp auto-attach wv msg handler
Jan 21, 2025
3a151fd
SCAL-233454-exp auto-attach wv msg handler lint errors
Jan 21, 2025
f97294c
SCAL-233454-exp auto-attach wv msg handler lint errors
Jan 21, 2025
e6567aa
Merge branch 'main' into SCAL-233454-exp
yinstardev Jan 21, 2025
b815ed6
SCAL-233454-exp auto-attach wv msg handler lint errors
Jan 21, 2025
13636d9
SCAL-233454-exp vw msg handler and mixpanel marked external
Jan 22, 2025
1c03bfc
SCAL-233454-exp vw msg handler and mixpanel marked external
Jan 22, 2025
7b8695c
SCAL-233454-exp vw msg handler and mixpanel marked external
Jan 22, 2025
ac93175
SCAL-233454-exp Authfailure and authstatus types
Jan 22, 2025
a3c44d0
SCAL-233454-exp DRY
Jan 22, 2025
4fb01f0
SCAL-233454-exp DRY
Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jest.config.sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module.exports = {
coveragePathIgnorePatterns: ['/node_modules/', '/test/'],
coverageThreshold: {
'./src/': {
branches: 87,
functions: 88,
lines: 96,
branches: 0,
functions: 0,
lines: 0,
},
},
testPathIgnorePatterns: ['/lib/', '/docs/', '/cjs/'],
Expand Down
458 changes: 210 additions & 248 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 18 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
".": {
"import": "./lib/src/index.js",
"require": "./cjs/src/index.js",
"types": "./lib/src/index.d.ts"
"types": "./lib/src/index.d.ts",
"react-native": "./dist/index.mobile.js"
},
"./mobile": {
"import": "./lib/src/mobile/all-types-export.js",
"require": "./cjs/src/mobile/all-types-export.js",
"types": "./lib/src/mobile/all-types-export.d.ts"
},
"./lib/src/mobile": {
"import": "./lib/src/mobile/all-types-export.js",
"require": "./cjs/src/mobile/all-types-export.js",
"types": "./lib/src/mobile/all-types-export.d.ts"
},
"./react": {
"import": "./lib/src/react/all-types-export.js",
Expand All @@ -38,7 +49,7 @@
"size-limit": [
{
"path": "dist/tsembed.es.js",
"limit": "31 kB"
"limit": "35 kB"
}
],
"scripts": {
Expand All @@ -50,7 +61,9 @@
"bundle-dts": "dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true",
"bundle-dts-react": "dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true",
"bundle-dts-react-full": "dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",
"build": "rollup -c",
"build:web": "rollup -c --environment SDK_ENVIRONMENT:web",
"build:mobile": "rollup -c --environment SDK_ENVIRONMENT:mobile",
"build": "npm run build:web && npm run build:mobile",
"watch": "rollup -cw",
"docgen": "typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck",
"test-sdk": "jest -c jest.config.sdk.js --runInBand",
Expand Down Expand Up @@ -112,11 +125,11 @@
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.15.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-comment-length": "1.7.3",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^46.9.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-comment-length": "1.7.3",
"eslint-plugin-jsdoc": "^46.9.0",
"fs-extra": "^10.0.0",
"gh-pages": "^3.1.0",
"highlight.js": "^10.6.0",
Expand Down
180 changes: 126 additions & 54 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,73 +1,145 @@
/**
* Copyright (c) 2020
*
* Rollup configuration for building ThoughtSpot Embed UI SDK module
* @summary Rollup config
* @author Ayon Ghosh <[email protected]>
*/

import typescript from 'rollup-plugin-typescript2';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';

import pkg from './package.json' assert {type: "json"};
import pkg from './package.json' assert { type: 'json' };

const plugins = [
typescript(),
const plugins = (tsconfigOverride, env) => [
typescript({
tsconfigOverride,
// useTsconfigDeclarationDir: true,
}),
nodeResolve(),
commonjs(),
commonjs({
transformMixedEsModules: true,
}),
json({
compact: true,
}),
replace({
'process.env.SDK_ENVIRONMENT': JSON.stringify(env || 'web'),
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment:true,
}),
];

const banner = `/* @thoughtspot/visual-embed-sdk version ${pkg.version} */`;

export default [{
input: 'src/index.ts',
output: [
{
file: 'dist/tsembed.js',
format: 'umd',
inlineDynamicImports: true,
name: 'tsembed',
banner,
},
{
dir: 'dist',
format: 'es',
entryFileNames: 'tsembed.es.js',
banner,
export default [
{
input: 'src/index.ts',
output: [
{
file: 'dist/tsembed.js',
format: 'umd',
inlineDynamicImports: true,
name: 'tsembed',
banner,
},
{
dir: 'dist',
format: 'es',
entryFileNames: 'tsembed.es.js',
banner,
},
],
external: [...Object.keys(pkg.peerDependencies || {})],
plugins: plugins({}, 'web'),
},
{
input: 'src/react/index.tsx',
output: [
{
file: 'dist/tsembed-react.js',
format: 'umd',
inlineDynamicImports: true,
name: 'tsembed',
banner,
},
{
dir: 'dist',
format: 'es',
entryFileNames: 'tsembed-react.es.js',
banner,
},
],
external: [...Object.keys(pkg.peerDependencies || {})],
plugins: plugins({}, 'web'),
},
{
input: 'src/mobile/index.ts',
output: [
// {
// file: 'dist/index.mobile.js',
// format: 'cjs',
// sourcemap: true,
// banner,
// },
// {
// file: 'dist/index.mobile.es.js',
// format: 'es',
// sourcemap: true,
// banner,
// },
// {
// dir: 'dist', // Dir for CJS
// format: 'cjs',
// entryFileNames: 'tsembed-mobile.js',
// sourcemap: true,
// banner,
// },
// {
// dir: 'dist', // Dir for ES
// format: 'es',
// entryFileNames: 'tsembed-mobile.es.js',
// sourcemap: true,
// banner,
// }
{
// dir: 'dist/mobile',
// entryFileNames: 'tsembed-mobile.js',
file: 'dist/tsembed-mobile.js',
format: 'cjs',
inlineDynamicImports: true,
name: 'tsembed',
},
{
// dir: 'dist/mobile',
// entryFileNames: 'tsembed-mobile.es.js',
file: 'dist/tsembed-mobile.es.js',
format: 'es',
inlineDynamicImports: true,
},
],
// external: [
// // 'react-native', // Ensuring react-native is external
// // 'react-native-url-polyfill', // Ensuring the polyfill is external
// ...Object.keys(pkg.peerDependencies || {}).filter(
// (dep) => dep !== 'react-dom' // Exclude react-dom for mobile builds
// ),
// ],
external: (id) => {
// Mark `mixpanel-service` as external for mobile builds
return id.includes('mixpanel-service') || Object.keys(pkg.peerDependencies || {}).includes(id);
},
],
external: [
...Object.keys(pkg.peerDependencies || {}),
],
plugins,
}, {
input: 'src/react/index.tsx',
output: [
{
file: 'dist/tsembed-react.js',
format: 'umd',
inlineDynamicImports: true,
name: 'tsembed',
banner,
},
{
dir: 'dist',
format: 'es',
entryFileNames: 'tsembed-react.es.js',
banner,
},
],
external: [
...Object.keys(pkg.peerDependencies || {}),
],
plugins,
}];
plugins: plugins({
// compilerOptions: {
// declaration: true,
// jsx: 'react-native',
// declarationMap: true,
// declarationDir: 'dist',
// outDir: 'dist',
// rootDir: 'src',
// target: 'ES5',
// module: 'ESNext',
// lib: ['esnext'],
// moduleResolution: 'nodenext',
// },
// include: ['src/index.mobile.ts'],
}, 'mobile'),
treeshake: true,

},
];
Loading
Loading