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

Convert codebase to ESM #163

Merged
merged 170 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
6afa25c
add missing dependency
alexasselin008 Oct 11, 2024
c785b27
remove editable preview
alexasselin008 Oct 15, 2024
6c52b4b
initial commit of the conversion
alexasselin008 Oct 17, 2024
b0957f5
Update theme and storybook to be the same as before
alexasselin008 Oct 17, 2024
564dd7a
update dependencies
alexasselin008 Oct 18, 2024
5d8ab84
update node
alexasselin008 Oct 18, 2024
b699453
revert testing library to test the CI
alexasselin008 Oct 21, 2024
161a970
fix some failing tests
alexasselin008 Oct 21, 2024
0104735
update @testing-library
alexasselin008 Oct 22, 2024
cf7c76f
update netlify configs
alexasselin008 Oct 22, 2024
699c907
update chromatic trigger to include ready to review
alexasselin008 Oct 22, 2024
7531de8
Merge branch 'master' into master-esm
alexasselin008 Oct 22, 2024
6d43939
add master-esm to the CI
alexasselin008 Oct 22, 2024
85292ab
converted some chroma stories to CSF3 format
fraincs Oct 23, 2024
88b0240
[DS-416] Migrate to pnpm (#171)
victortrinh2 Oct 23, 2024
6abb5b5
Merge branch 'master-esm' into feature/ds-412
alexasselin008 Oct 24, 2024
5fb9786
update scripts to the latest version and activate turbosnap
alexasselin008 Oct 24, 2024
95aa819
fix the ci script as well
alexasselin008 Oct 24, 2024
98e4c85
Merge pull request #174 from gsoft-inc/feature/turbosnap_update_pipeline
alexasselin008 Oct 24, 2024
6b2856b
Merge branch 'master-esm' into feature/ds-412
alexasselin008 Oct 24, 2024
9f704d5
converted iconButton to CSF3
fraincs Oct 23, 2024
b5f6a5e
converted all button tests to CSF3
fraincs Oct 23, 2024
9f453df
added more tests
fraincs Oct 24, 2024
a9a6956
removed all remaining chroma tests
fraincs Oct 25, 2024
07f19d0
linting errors
fraincs Oct 25, 2024
6657fe4
more linting issues
fraincs Oct 25, 2024
17f1b0c
added missing chromatic delays
fraincs Oct 25, 2024
685a315
added missing chromatic delays batch 2
fraincs Oct 25, 2024
6ad4c7b
first draft of the documentation
alexasselin008 Oct 29, 2024
eda279b
fixed test names / removed unnecessary story
fraincs Oct 29, 2024
ad38449
missing preset in 2 date input stories
fraincs Oct 29, 2024
6a68f07
Merge pull request #173 from gsoft-inc/feature/ds-412
fraincs Oct 29, 2024
7f527f7
first pass of documentation
alexasselin008 Oct 30, 2024
0c50510
add change the import paths
alexasselin008 Oct 30, 2024
a24bfaf
remove comments from .mdx
alexasselin008 Oct 30, 2024
6235e0f
fix documentation styles
alexasselin008 Oct 30, 2024
fb5e280
fix highlight
alexasselin008 Oct 31, 2024
a65ec8b
added typo and textarea tests
fraincs Oct 31, 2024
dc35051
highlight in text
fraincs Oct 31, 2024
1cbaa00
Box
victortrinh2 Oct 31, 2024
6d8e55b
Dot
victortrinh2 Oct 31, 2024
10f1ca6
Card
victortrinh2 Oct 31, 2024
9aac97c
added tag
fraincs Oct 31, 2024
b4cc78b
removed unnecessary file
fraincs Oct 31, 2024
f12f4f7
Form
victortrinh2 Oct 31, 2024
2561cf1
Link
victortrinh2 Oct 31, 2024
df232ca
Address
victortrinh2 Oct 31, 2024
e802462
Anchor
victortrinh2 Oct 31, 2024
a306132
Article
victortrinh2 Oct 31, 2024
68a3def
Aside
victortrinh2 Oct 31, 2024
93a2d04
added Tabs
fraincs Oct 31, 2024
8e229c8
HTMLButton
victortrinh2 Oct 31, 2024
bf506f2
Div
victortrinh2 Nov 1, 2024
9c6c4e1
reworked Switch
fraincs Nov 1, 2024
e1fcf0c
converted Menu
fraincs Nov 1, 2024
0e2b7af
added select
fraincs Nov 1, 2024
0672097
added illustratedMessage and RAdio
fraincs Nov 1, 2024
0904682
removed unnecessary mdx imports / added missing filed
fraincs Nov 1, 2024
0ded8f2
Footer
victortrinh2 Nov 4, 2024
56fb561
Header
victortrinh2 Nov 4, 2024
452e0d8
Img
victortrinh2 Nov 4, 2024
63a7372
Input
victortrinh2 Nov 4, 2024
9416a15
List
victortrinh2 Nov 4, 2024
151a674
Main
victortrinh2 Nov 4, 2024
4e2f386
Nav
victortrinh2 Nov 4, 2024
55d697f
converted Tile
fraincs Nov 2, 2024
524bae2
added alert/badge/image
fraincs Nov 4, 2024
5340f2c
Section
victortrinh2 Nov 4, 2024
3c0b6fb
Span
victortrinh2 Nov 4, 2024
a77e12f
Table
victortrinh2 Nov 4, 2024
1b28cf6
Flex
victortrinh2 Nov 4, 2024
4a69c41
Renaming some nodes we see in the doc
victortrinh2 Nov 4, 2024
e465558
Grid
victortrinh2 Nov 4, 2024
d2ba62e
Field
victortrinh2 Nov 4, 2024
7e1baa8
Avatar
victortrinh2 Nov 4, 2024
54f736e
Button
victortrinh2 Nov 4, 2024
79c8fa5
added Modal / Disclosure-Arrow / CrossButton
fraincs Nov 4, 2024
51159ed
Autocomplete
victortrinh2 Nov 4, 2024
1dec481
Counter
victortrinh2 Nov 4, 2024
b936a81
added inputGroup / Transition
fraincs Nov 4, 2024
c34046e
Content / Footer / Header
victortrinh2 Nov 4, 2024
af133b5
added Lozenge/Popover
fraincs Nov 4, 2024
71e5db1
update doc features
alexasselin008 Nov 4, 2024
ed9c7ce
Merge branch 'feature/esm_doc' of https://github.com/gsoft-inc/wl-orb…
alexasselin008 Nov 4, 2024
cd5e954
Merge branch 'master-esm' into feature/esm_doc
alexasselin008 Nov 4, 2024
b571f47
added loader and tooltip
fraincs Nov 4, 2024
e198c93
convert some files to ts
alexasselin008 Nov 4, 2024
5b2c1da
Merge branch 'feature/esm_doc' of https://github.com/gsoft-inc/wl-orb…
alexasselin008 Nov 4, 2024
02814e3
remove yarn lock
alexasselin008 Nov 4, 2024
8e6a2f0
removed unnecessary sample
fraincs Nov 4, 2024
0f07cf8
removed unnecessary sample
fraincs Nov 4, 2024
abb5f8a
added checkboxgroup
fraincs Nov 4, 2024
0fbcafc
checkbox fixes
fraincs Nov 5, 2024
19757eb
added toolbar / nunberInput
fraincs Nov 5, 2024
67680af
Divider/Listbox
victortrinh2 Nov 4, 2024
201ea64
Illustration
victortrinh2 Nov 5, 2024
23e73ba
ThemeProvider
victortrinh2 Nov 5, 2024
3bf9d1c
added dateInput and dateRangeInput
fraincs Nov 5, 2024
4cb5fe9
fix build
alexasselin008 Nov 5, 2024
07af614
fix source
alexasselin008 Nov 5, 2024
c64a353
Merge branch 'feature/esm_doc' of https://github.com/gsoft-inc/wl-orb…
alexasselin008 Nov 5, 2024
b19762e
fix part of the linting
alexasselin008 Nov 5, 2024
a5cce07
fix a couple of errors
alexasselin008 Nov 5, 2024
acda07d
fix fit property
alexasselin008 Nov 5, 2024
06101b1
update select issues
alexasselin008 Nov 5, 2024
7cda2a6
fix doc example
alexasselin008 Nov 5, 2024
275fb00
woops
alexasselin008 Nov 5, 2024
f4b1453
lint
fraincs Nov 5, 2024
6aa07cb
fixed typing issue
fraincs Nov 5, 2024
b3ea4a9
fix linting
alexasselin008 Nov 6, 2024
8905b73
fix prop table
alexasselin008 Nov 6, 2024
9562f14
fix eslint/stylelint + update to esm
alexasselin008 Nov 6, 2024
a6f3057
Fix all import paths extensions except paths such as component/*
alexasselin008 Nov 7, 2024
59ba18f
fix @components import + fix html import path
alexasselin008 Nov 7, 2024
1ce9bd5
fix a bunch of import paths
alexasselin008 Nov 7, 2024
ad62b88
fix eslint
alexasselin008 Nov 7, 2024
1fecc1e
fix typo
alexasselin008 Nov 7, 2024
7dba6d9
convert more stuff
alexasselin008 Nov 7, 2024
8277606
fix 4 stories that were broken
alexasselin008 Nov 7, 2024
0e1a658
Merge branch 'feature/esm_doc' into feature/esm_conversion
alexasselin008 Nov 7, 2024
2d35fd4
Feature/ds 414 styling orbiter (#177)
victortrinh2 Nov 7, 2024
a1da196
fix select
alexasselin008 Nov 7, 2024
90cf109
add exports
alexasselin008 Nov 7, 2024
48324db
fix build
alexasselin008 Nov 7, 2024
61b2b3e
Table
victortrinh2 Nov 7, 2024
5330720
Fix code blocks styling
victortrinh2 Nov 8, 2024
7249dad
Fix lint
victortrinh2 Nov 8, 2024
4dbc30a
Feature/esm doc (#175)
alexasselin008 Nov 8, 2024
be0e32b
update dependencies and try to fix jest
alexasselin008 Nov 8, 2024
65feab2
fix the textMaskCore error injest
alexasselin008 Nov 8, 2024
ac5324a
Merge branch 'feature/esm_doc' into feature/esm_conversion
alexasselin008 Nov 8, 2024
7757b3e
Merge branch 'master-esm' into feature/esm_conversion
alexasselin008 Nov 8, 2024
16bf6e4
Copy function into repo
victortrinh2 Nov 11, 2024
c4c2528
convert to TS
alexasselin008 Nov 11, 2024
c9e23c7
Merge pull request #179 from gsoft-inc/copy-text-mask-core
alexasselin008 Nov 11, 2024
ff71d2a
Merge pull request #178 from gsoft-inc/feature/esm_conversion
alexasselin008 Nov 11, 2024
240901d
Update netlify node version
victortrinh2 Nov 11, 2024
ac882d2
test netlify config
alexasselin008 Nov 11, 2024
2df8a63
fix config
alexasselin008 Nov 11, 2024
2754336
according to the doc, pnpm i i not needed
alexasselin008 Nov 11, 2024
9d9467f
Try upgrading netlify-cli
victortrinh2 Nov 11, 2024
6fb19a9
add package manager version
alexasselin008 Nov 11, 2024
1143289
add more memory
alexasselin008 Nov 11, 2024
63217fd
update some deps
alexasselin008 Nov 11, 2024
fcbda76
change webpack settings
alexasselin008 Nov 11, 2024
87eea8c
readd missing storybook settings
alexasselin008 Nov 11, 2024
f7ccdd3
fix storybook build
alexasselin008 Nov 11, 2024
fc8db6c
fix styling
alexasselin008 Nov 11, 2024
9d54c91
remove plugin
alexasselin008 Nov 12, 2024
9704ff9
test
alexasselin008 Nov 12, 2024
20c9429
readd plugin
alexasselin008 Nov 12, 2024
ad9b730
Fix formatCode function
victortrinh2 Nov 12, 2024
8e29945
Fix formatCode, use older version of prettier
victortrinh2 Nov 12, 2024
9154c59
Fix lint and storybook code
victortrinh2 Nov 12, 2024
bc389fb
Fix theme issues
victortrinh2 Nov 12, 2024
05721a9
Remove displayName
victortrinh2 Nov 12, 2024
deb949b
primary toggle button chroma test was rendenring a secondary variant
fraincs Nov 13, 2024
853f3e3
remove unused file
alexasselin008 Nov 13, 2024
5457e2d
Add Open in Stackblitz in Storybook Canvas
victortrinh2 Nov 13, 2024
ba018b4
Use new Canvas everywhere
victortrinh2 Nov 13, 2024
c6d5dcd
Add Stackblitz logo
victortrinh2 Nov 13, 2024
1fcda1f
try to fix prettier-local imports
alexasselin008 Nov 18, 2024
0f11191
Fix doc and push to rebuild PR
victortrinh2 Nov 18, 2024
d4e63d6
Try minimizing again
victortrinh2 Nov 19, 2024
13581f9
Optimize webpack config for storybook
victortrinh2 Nov 19, 2024
3e8a118
Minimize again
victortrinh2 Nov 19, 2024
0507012
Update chromatic
victortrinh2 Nov 19, 2024
d823df0
Remove useless changes
victortrinh2 Nov 19, 2024
04a473c
I guess it wasn't useless
victortrinh2 Nov 19, 2024
fbb6363
Added comments
victortrinh2 Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/.vscode
storybook-static
node_modules
dist
*.svg
package.json
*.css
!/.storybook
!/**/.storybook
86 changes: 0 additions & 86 deletions .eslintrc.js

This file was deleted.

34 changes: 34 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": ["plugin:@workleap/react-library"],
"rules": {
"no-console": ["warn", { "allow": ["warn", "error"] }],
"react/destructuring-assignment": "off",
"no-param-reassign": "off",

// New Workleap rules that we don't want to enforce yet
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"react/no-unused-prop-types": "off"

},
"overrides": [
{
"files": ["*.mdx"],
"rules":{
"react/jsx-no-undef": "off"
}
},
{
"files": [
".storybook/*",
"**/scripts/*.js"
],
"rules":{
"no-console": "off"
}
}
]
}
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Before submitting your pull request, please:

1. Read our contributing documentation: https://github.com/gsoft-inc/wl-orbiter/blob/master/CONTRIBUTING.md
2. Ensure there are no linting or TypeScript errors: `yarn lint`
3. Verify that tests pass: `yarn jest`
2. Ensure there are no linting or TypeScript errors: `pnpm lint`
3. Verify that tests pass: `pnpm jest`
-->

Issue:
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Changeset

on:
push:
branches: ["master"]
branches: ["master", "master-esm"]

jobs:
release:
Expand All @@ -14,23 +14,29 @@ jobs:
pull-requests: write
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache yarn dependencies
uses: actions/cache@v3
node-version-file: ".nvmrc"

- name: Cache pnpm store
uses: actions/cache@v4
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.ox }}-yarn-
- name: Install Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install pnpm
run: |
yarn install --frozen-lockfile
corepack enable
pnpm install --frozen-lockfile

- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,51 @@ name: Chromatic

on:
pull_request:
# Opened, synchronize, or reopened are the default types
# We added ready_for_review to trigger the workflow is passed from draft to ready_for_review
types: ["opened", "synchronize", "reopened", "ready_for_review"]
branches-ignore:
- changeset-release/*

jobs:
chromatic:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile

- name: Build Packages
run: yarn build
run: pnpm run build

- name: Publish to Chromatic
uses: chromaui/[email protected]
uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build-sb-chroma


traceChanged: true
onlyChanged: true # TurboSnap
exitOnceUploaded: true # The PRs will be marked as success/failure based on the Chromatic build status
65 changes: 50 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: CI

on:
push:
branches: ["master"]
branches: ["master", "master-esm"]
pull_request:
branches: ["master"]
branches: ["master", "master-esm"]

concurrency:
group: ${{ github.ref }}
Expand All @@ -18,42 +18,77 @@ jobs:
name: "Eslint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Lint Eslint
run: yarn lint-ci-eslint
run: pnpm run lint-ci-eslint

stylelint:
name: "Stylelint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Lint Stylelint
run: yarn lint-ci-style
run: pnpm run lint-ci-style

build_and_tests:
name: "Build and Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm run lint-ci-eslint
- name: Build Packages
run: yarn build
run: pnpm run build
- name: Run Jest
run: yarn test
run: pnpm run test
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
node_modules
dist
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
*.tgz
__MACOSX
.DS_Store
Expand All @@ -13,3 +10,5 @@ storybook-static
.stylelintcache
build-storybook.log
.idea
migration-storybook.log
storybook.log
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
public-hoist-pattern[]=*
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14
lts/*
4 changes: 2 additions & 2 deletions .storybook/components/banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./Banner.css";

import { Div, DivProps } from "@components/html";
import { mergeProps } from "@components/shared";
import { Div, DivProps } from "@components/html/index.ts";
import { mergeProps } from "@components/shared/index.ts";

export function Banner({ children, ...rest }: DivProps) {
return (
Expand Down
2 changes: 1 addition & 1 deletion .storybook/components/banner/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./Banner";
export * from "./Banner.tsx";
Loading