-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feat/typescript support poc 2 #1427
Closed
Closed
Changes from 11 commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
cf5868b
feat(packages/sui-bundler): add ts support
andresz1 1782cdc
feat: add support for tsx
d6a64ad
Merge branch 'master' into feat/typescript-support-poc-2
6258208
Merge branch 'feat/typescript-support-poc' into feat/typescript-suppo…
andresz1 be032c1
Merge branch 'feat/typescript-support-poc-2' of github.com:SUI-Compon…
andresz1 d317f4c
feat(packages/sui-bundler): update config
andresz1 c88abfd
feat(packages/sui-studio): add initial typescript support
andresz1 ecb5b24
feat(packages/sui-studio): remove index extension to support typescri…
andresz1 b2953ba
Merge branch 'master' into feat/typescript-support-poc-2
andresz1 70bc6ef
feat(packages/sui-bundler): remove not needed app extension
andresz1 bdbadd2
Merge branch 'feat/typescript-support-poc' into feat/typescript-suppo…
andresz1 f5e3f27
feat(packages/sui-studio): update package import
andresz1 9205c48
feat(packages/sui-studio): update studio import
andresz1 85ce350
chore: ts overrides changes
b853f92
feat(packages/sui-test): add jest command for sui-test
giodelabarrera f4c7c51
chore(Root): add npmrc for allow isolated npm config
giodelabarrera 798a5d4
chore(packages/sui-test): add jest dependencies
giodelabarrera a00b251
feat(packages/sui-test): add default sui jest config
giodelabarrera 0e3c577
chore(packages/sui-test): add swc jest
giodelabarrera ec0b8c0
chore(packages/sui-test): remove babel-jest dependency
giodelabarrera bb1c153
docs(packages/sui-test): add todo comment
giodelabarrera 751f91f
feat(packages/sui-js-compiler): use latest swc helpers version
3ed25f5
feat(packages/sui-studio): remove extensions from imports
3330883
feat(packages/sui-lint): fix rule value
2909eeb
feat(packages/sui-bundler): use latest swc helpers
9c37ed9
Merge branch 'master' into feat/poc-jest
giodelabarrera 5caa961
chore(packages/sui-test): add beta
giodelabarrera 2d63279
chore(packages/sui-bundler): add typescript tag
giodelabarrera 7fffe91
chore(packages/sui-js-compiler): add typescript tag
giodelabarrera 96ec6e2
chore(packages/sui-lint): add typescript tag
giodelabarrera 7fd4957
chore(packages/sui-studio): add typescript tag
giodelabarrera 8c5afa4
feat(packages/sui-bundler): read typescript mode from package json co…
12b84c8
chore(packages/sui-bundler): add version typescript number
giodelabarrera 0988f8b
chore(packages/sui-test): create jest tag beta version
giodelabarrera 36a13a7
feat(packages/sui-lint): add eslint rules overrides for chai tests
6dba47a
feat(packages/sui-lint): Disabled the rule return-await ( for typescr…
113e481
feat(packages/sui-js-compiler): add new test folder to ignore
giodelabarrera 621e364
chore(packages/sui-js-compiler): add jest beta tag
giodelabarrera f75f241
Merge branch 'master' into feat/poc-jest
giodelabarrera 8e4769e
feat(packages/sui-js-compiler): use ignore name for destructuring and…
giodelabarrera c2af7b7
chore(packages/sui-js-compiler): upgrade version
giodelabarrera 3e3dcaa
feat(packages/sui-lint): add jest rules
giodelabarrera 5b62800
chore(packages/sui-lint): add eslint jest dependency
giodelabarrera f0ac5b3
chore(packages/sui-lint): upgrade version
giodelabarrera fb8f526
chore(packages/sui-react-context): use package types from lib folder
30ae1b1
Merge branch 'feat/typescript-support-poc' into feat/typescript-suppo…
ef67cf8
feat(packages/sui-lint): add eslint-config-standard-react dependency
d0451af
feat(packages/sui-bundler): bump version after master merge
1bd063d
feat(packages/sui-js-compiler): bump version after master merge
66e6fe2
feat(packages/sui-lint): bump version after master merge
6fed8fe
feat(packages/sui-studio): bump version after master merge
b6e6bcc
feat(packages/sui-lint): upgrade to latest eslint ts plugin
16380e1
Merge branch 'master' into feat/typescript-support-poc-2
ecdc2b9
feat(packages/sui-bundler): use latest swc versions
7833cac
feat(packages/sui-js-compiler): use latest swc versions
e1114b3
feat(packages/sui-bundler): bump version for latest swc
32dc648
feat(packages/sui-js-compiler): bump version for latest swc
0f69a24
Merge branch 'feat/typescript-support-poc' into feat/typescript-suppo…
kikoruiz 77c7180
feat(packages/sui-bundler): adapt bundler to new changes
kikoruiz 8fd91e7
Merge branch 'feat/typescript-support-poc' into feat/typescript-suppo…
kikoruiz e7d6353
chore(packages/sui-studio): update deps
kikoruiz 16469f7
fix(packages/sui-bundler): reset swc dependencies versions
kikoruiz 895f01c
Merge branch 'master' into feat/typescript-support-poc-2
kikoruiz 5568b6d
Merge branch 'master' into feat/poc-jest
andresz1 16e2bd7
chore: update code owners
kikoruiz 0e2f2a2
feat(packages/sui-lint): add jest rules
andresz1 f15be4c
feat(packages/sui-jest): add wrapper for jest
giodelabarrera edbeccd
chore(packages/sui-jest): update homepage url
giodelabarrera 8b99407
chore(packages/sui-jest): improve package description
giodelabarrera 46ea335
docs(packages/sui-jest): add basic usage and config description
giodelabarrera 4a0050d
chore(packages/sui-jest): modify package description
giodelabarrera 1789352
feat(packages/sui-test): remove jest since it has been moved to a new…
giodelabarrera a5fa72a
docs(packages/sui-jest): update specific config option
giodelabarrera c7f6721
chore(packages/sui-js-compiler): apply format
giodelabarrera da1b99a
docs(Root): add sui-jest for available packages
giodelabarrera df148e5
feat(packages/sui-lint): remove comment
andresz1 bf53091
feat(packages/sui-mono): upgrade git-url-parse dependency to major 13
jordevo 666e40b
Merge pull request #1609 from SUI-Components/feat-upgrade-sui-mono-gi…
jordevo f261932
release(packages/sui-mono): v2.35.0 [skip ci]
sui-bot a8b5d1c
Merge pull request #1565 from SUI-Components/feat/poc-jest
giodelabarrera 879f30d
release(packages/sui-jest): v1.1.0 [skip ci]
sui-bot 29202e4
release(packages/sui-js-compiler): v1.24.0 [skip ci]
sui-bot d1a99f3
release(packages/sui-lint): v4.31.0 [skip ci]
sui-bot 130d67a
release(packages/sui-test): v8.26.0 [skip ci]
sui-bot a851c59
fix(packages/sui-i18n): fix missed key warning when i18n.url
javiauso 03eedc7
Merge pull request #1610 from SUI-Components/fix/i18n-url-translate-e…
javiauso 46957a2
release(packages/sui-i18n): v1.33.0 [skip ci]
sui-bot 7d5f61b
Merge pull request #1608 from SUI-Components/feat/lint-jest
andresz1 b8bed2b
release(packages/sui-lint): v4.32.0 [skip ci]
sui-bot 316c987
fix(packages/sui-i18n): restore slash when token is validated in i18n…
javiauso eb9cc8d
fix(packages/sui-lint): update jest rules
andresz1 37af403
Merge pull request #1612 from SUI-Components/fix/sui-jest-lint
andresz1 f8e57a1
release(packages/sui-lint): v4.33.0 [skip ci]
sui-bot ed3d01f
Merge pull request #1611 from SUI-Components/fix/i18n-url-translate-e…
javiauso 6854f78
release(packages/sui-i18n): v1.34.0 [skip ci]
sui-bot aee0a28
Merge branch 'feat/typescript-support-poc-2' of github.com:SUI-Compon…
carlosvillu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[ | ||
{ | ||
"test": ".tsx?$", | ||
"minify": true, | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true, | ||
"dynamicImport": true, | ||
"privateMethod": true, | ||
"functionBind": true, | ||
"exportDefaultFrom": true, | ||
"exportNamespaceFrom": true, | ||
"decorators": true, | ||
"decoratorsBeforeExport": true, | ||
"topLevelAwait": true, | ||
"importMeta": true | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"react": { | ||
"useBuiltins": true, | ||
"runtime": "automatic" | ||
} | ||
}, | ||
"target": "es5", | ||
"loose": true, | ||
"externalHelpers": true | ||
}, | ||
"env": { | ||
"targets": { | ||
"ie": "11" | ||
}, | ||
"dynamicImport": true, | ||
"loose": true, | ||
"mode": "entry", | ||
"coreJs": 3 | ||
} | ||
}, | ||
{ | ||
"test": ".jsx?$", | ||
"minify": true, | ||
"jsc": { | ||
"parser": { | ||
"syntax": "ecmascript", | ||
"jsx": true, | ||
"dynamicImport": true, | ||
"privateMethod": true, | ||
"functionBind": true, | ||
"exportDefaultFrom": true, | ||
"exportNamespaceFrom": true, | ||
"decorators": true, | ||
"decoratorsBeforeExport": true, | ||
"topLevelAwait": true, | ||
"importMeta": true | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"react": { | ||
"useBuiltins": true, | ||
"runtime": "automatic" | ||
} | ||
}, | ||
"target": "es5", | ||
"loose": true, | ||
"externalHelpers": true | ||
}, | ||
"env": { | ||
"targets": { | ||
"ie": "11" | ||
}, | ||
"dynamicImport": true, | ||
"loose": true, | ||
"mode": "entry", | ||
"coreJs": 3 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,82 @@ | ||
const path = require('path') | ||
const {config} = require('./index.js') | ||
|
||
const {TS: isTypeScript = false} = process.env | ||
|
||
const EXCLUDED_FOLDERS_REGEXP = new RegExp( | ||
`node_modules(?!${path.sep}@s-ui(${path.sep}studio)(${path.sep}workbench)?${path.sep}src)` | ||
) | ||
|
||
module.exports = ({isServer = false} = {}) => ({ | ||
test: /\.jsx?$/, | ||
exclude: EXCLUDED_FOLDERS_REGEXP, | ||
use: [ | ||
{ | ||
loader: require.resolve('babel-loader'), | ||
options: { | ||
cacheDirectory: true, | ||
cacheCompression: false, | ||
babelrc: false, | ||
compact: true, | ||
presets: [ | ||
[ | ||
require.resolve('babel-preset-sui'), | ||
{ | ||
isServer, | ||
supportLegacyBrowsers: true, | ||
targets: config.targets | ||
module.exports = ({isServer = false} = {}) => | ||
isTypeScript | ||
? { | ||
test: /\.(js|ts)x?$/, | ||
exclude: EXCLUDED_FOLDERS_REGEXP, | ||
use: [ | ||
{ | ||
loader: require.resolve('swc-loader'), | ||
options: { | ||
minify: true, | ||
jsc: { | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: true, | ||
dynamicImport: true, | ||
privateMethod: true, | ||
functionBind: true, | ||
exportDefaultFrom: true, | ||
exportNamespaceFrom: true, | ||
decorators: true, | ||
decoratorsBeforeExport: true, | ||
topLevelAwait: true, | ||
importMeta: true | ||
}, | ||
transform: { | ||
legacyDecorator: true, | ||
react: { | ||
useBuiltins: true, | ||
runtime: 'automatic' | ||
} | ||
}, | ||
target: 'es5', | ||
loose: true, | ||
externalHelpers: true | ||
}, | ||
env: { | ||
targets: { | ||
ie: '11' | ||
}, | ||
dynamicImport: true, | ||
loose: true, | ||
mode: 'entry', | ||
coreJs: 3 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
: { | ||
test: /\.jsx?$/, | ||
exclude: EXCLUDED_FOLDERS_REGEXP, | ||
use: [ | ||
{ | ||
loader: require.resolve('babel-loader'), | ||
options: { | ||
cacheDirectory: true, | ||
cacheCompression: false, | ||
babelrc: false, | ||
compact: true, | ||
presets: [ | ||
[ | ||
require.resolve('babel-preset-sui'), | ||
{ | ||
isServer, | ||
supportLegacyBrowsers: true, | ||
targets: config.targets | ||
} | ||
] | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to try it out use set TS env variable to true. e.g.
TS=true npm run studio dev