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

chore: mono package is back! #2637

Merged
merged 50 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9a4cffb
chore: mono package is back!
theo-mesnil Dec 18, 2024
1b645a1
feat: migrate components
theo-mesnil Jan 7, 2025
2a9a66c
docs: remove is migrated components condition
theo-mesnil Jan 8, 2025
1fbb56b
feat: add icons packages
theo-mesnil Jan 9, 2025
bc35d3f
feat: remove old packages
theo-mesnil Jan 9, 2025
759b40b
feat: rework circle
theo-mesnil Jan 9, 2025
d67b555
docs: add peerDependencies on Installation block
theo-mesnil Jan 15, 2025
04a190d
chore: remove peer dependencies from bundle
theo-mesnil Jan 15, 2025
f7093a3
docs: rework migration script and add docs
theo-mesnil Jan 15, 2025
458c537
chore: remove useless banner option on vite (#2650)
theo-mesnil Jan 21, 2025
e68104b
chore: rework imports (#2652)
theo-mesnil Jan 22, 2025
cc5efaa
chore: move jest and babel on lib folder (#2653)
theo-mesnil Jan 23, 2025
2893d24
feat: rename IconFont to IconsFont (#2656)
theo-mesnil Jan 23, 2025
915a12f
chore: add release-it (#2655)
theo-mesnil Jan 23, 2025
77890d0
feat: include dependencies and remove main entry file for treeshaking
baptistetruchet Jan 23, 2025
4beaa28
rebase and yarn
baptistetruchet Jan 23, 2025
cca5411
fix Icons entry path
baptistetruchet Jan 23, 2025
9568a16
add @ aliases
baptistetruchet Jan 23, 2025
f8ae45d
do not build welcome-ui in dev for next
baptistetruchet Jan 23, 2025
9db5af6
update ref to components with aliases
baptistetruchet Jan 23, 2025
041612f
fix linter
baptistetruchet Jan 23, 2025
56ae108
fix build:website
baptistetruchet Jan 23, 2025
f8164e9
update desc generate icon hash script
baptistetruchet Jan 23, 2025
cbb731f
feat: circle fixes
theo-mesnil Jan 23, 2025
fa415f8
feat: improve doc and playground for v7
baptistetruchet Jan 23, 2025
166ac79
fix font improts
baptistetruchet Jan 27, 2025
7e53aa8
chore: move examples and properties exports to nextjs (#2660)
theo-mesnil Jan 28, 2025
3d9f89c
ci: rework for release from lib (#2663)
theo-mesnil Jan 28, 2025
2cfc43c
ci: fix pre release for alpha
theo-mesnil Jan 28, 2025
786828c
chore: release v7.0.0-alpha.0
theo-mesnil Jan 28, 2025
70d5f67
fix: missing dependencies
theo-mesnil Jan 28, 2025
eedb417
chore: release v7.0.0-alpha.1
theo-mesnil Jan 28, 2025
558087b
ci: fix caching
theo-mesnil Jan 28, 2025
534d041
ci: fix dev release
theo-mesnil Jan 28, 2025
9567aa8
ci: fix dev release
theo-mesnil Jan 28, 2025
e8abe86
ci: fix release
theo-mesnil Jan 29, 2025
29d65e8
chore: release v7.0.0-alpha.2
theo-mesnil Jan 29, 2025
d3e639a
chore: release v7.0.0-alpha.3
theo-mesnil Jan 29, 2025
b7205de
feat: add old website v6
theo-mesnil Jan 29, 2025
a264328
ci: fix npmrc
theo-mesnil Jan 29, 2025
5739201
chore: release v7.0.0-alpha.5
theo-mesnil Jan 29, 2025
0284877
chore: release v7.0.0-alpha.6
theo-mesnil Jan 29, 2025
f180ef6
docs: add changes on Iconsfont
theo-mesnil Jan 29, 2025
1f9cb90
feat: add missing exports on utils
theo-mesnil Jan 29, 2025
0a9e0e3
chore: release v7.0.0-alpha.7
theo-mesnil Jan 29, 2025
bc36cc8
fix migration doc regexp
baptistetruchet Jan 30, 2025
7097eed
fix: missing util export
theo-mesnil Jan 30, 2025
c6ddff8
chore: release v7.0.0-alpha.8
theo-mesnil Jan 30, 2025
9a1f594
fix: wrong export for ts files
theo-mesnil Jan 30, 2025
3725f14
chore: release v7.0.0-alpha.9
theo-mesnil Jan 30, 2025
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
  •  
  •  
  •  
114 changes: 70 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
parameters:
cache_version:
type: string
default: v5
default: v6
nodejs_base_image:
type: string
default: 'cimg/node:20.17.0'
Expand Down Expand Up @@ -39,16 +39,17 @@ jobs:
executor: nodejs
steps:
- *checkout
- *restore_node_modules
- run:
name: Run yarn install and save node modules
command: yarn install
- *restore_node_modules
- save_cache:
key: << pipeline.parameters.cache_version >>-yarn-{{ checksum "/home/circleci/welcome-ui/yarn.lock" }}
paths:
- ~/.cache/yarn
- ~/welcome-ui/node_modules
- ~/welcome-ui/website/node_modules
- ~/welcome-ui/lib/node_modules

vulnerabilities_yarn:
<<: *default
Expand All @@ -60,25 +61,21 @@ jobs:
- attach_workspace:
at: ~/welcome-ui
- run:
name: Critical vulnerabilities (yarn audit), lib versions and missing deps
command: yarn check:audit && yarn check:deps
name: Critical vulnerabilities (yarn audit)
command: yarn check:audit

build:
<<: *default
executor: nodejs
resource_class: xlarge
resource_class: medium
steps:
- *checkout
- *restore_node_modules
- run: yarn icons:build
- run: yarn build
- persist_to_workspace:
root: ~/welcome-ui
paths:
- packages/**/dist
- packages/Themes/**/dist
- icons/dist
- packages/IconFont/fonts
- lib/dist

lint:
<<: *default
Expand All @@ -99,35 +96,32 @@ jobs:
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run: yarn jest --detectOpenHandles $(circleci tests glob "./packages/**/*.test.{ts,js,tsx}" | circleci tests split | xargs)
- run: cd lib && yarn jest --detectOpenHandles $(circleci tests glob "./**/*.test.{ts,js,tsx}" | circleci tests split | xargs)

build_and_release_icon_font:
release_icon_font:
<<: *default
executor: nodejs
steps:
- *checkout
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run: yarn icons:collect --force
- run: yarn webfont:build
- run:
name: Prepare font hash
command: |
echo "export ICON_FONT_HASH=$(sha1sum packages/IconFont/fonts/welcome-icon-font.woff2 | awk '{ print $1 }')" >> $BASH_ENV
echo "export ICON_FONT_HASH=$(sha1sum lib/src/components/IconsFont/fonts/welcome-icon-font.woff2 | awk '{ print $1 }')" >> $BASH_ENV
source $BASH_ENV
yarn build:core
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: ${AWS_REGION}
- aws-s3/sync:
from: packages/IconFont/fonts
from: lib/src/components/IconsFont/fonts
to: s3://welcome-ui/public/fonts/icon-font/$ICON_FONT_HASH
arguments: |
--cache-control "public, max-age=31536000" --exclude "*" --include "welcome-icon-font.woff" --include "welcome-icon-font.woff2" --metadata GitCommit=$CIRCLE_SHA1 --delete
- aws-s3/sync:
from: packages/IconFont/fonts
from: lib/src/components/IconsFont/fonts
to: s3://wttj-production/fonts/icon-font/$ICON_FONT_HASH
arguments: |
--cache-control "public, max-age=31536000" --exclude "*" --include "welcome-icon-font.woff" --include "welcome-icon-font.woff2" --metadata GitCommit=$CIRCLE_SHA1 --delete
Expand All @@ -141,7 +135,7 @@ jobs:
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run: yarn website:build
- run: yarn build:website
- persist_to_workspace:
root: ~/welcome-ui
paths:
Expand Down Expand Up @@ -198,7 +192,7 @@ jobs:
at: ~/welcome-ui
- run:
name: build w/ prefix
command: VERSION=$CIRCLE_BRANCH yarn website:build
command: VERSION=$CIRCLE_BRANCH yarn build:website
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
Expand All @@ -210,34 +204,43 @@ jobs:
--metadata GitCommit=$CIRCLE_SHA1 --delete

release:
<<: *default
executor: nodejs
steps:
- *checkout
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run:
name: Login to registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Release to npm
command: yarn lerna publish from-git --yes --no-verify-access
name: publish
command: cd /home/circleci/welcome-ui/lib && npm publish --registry https://registry.npmjs.org

prerelease:
<<: *default
alpha_release:
executor: nodejs
steps:
- *checkout
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run:
name: Login to registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Release to npm
command: yarn lerna publish from-git --yes --no-verify-access --dist-tag next
name: publish
command: cd /home/circleci/welcome-ui/lib && npm publish --tag beta --registry https://registry.npmjs.org

dev_release:
executor: nodejs
steps:
- *checkout
- attach_workspace:
at: ~/welcome-ui
- run:
name: Login to registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: publish
command: node /home/circleci/welcome-ui/.dev-releases/publish.mjs

workflows:
btd:
Expand All @@ -263,77 +266,100 @@ workflows:
tags:
only: /.*/
requires:
- build
- checkout
- test:
filters:
tags:
only: /.*/
requires:
- build
- build_and_release_icon_font:
- checkout
- release_icon_font:
filters:
tags:
only: /.*/
context:
- aws
requires:
- lint
- test
- checkout
- website_build:
filters:
tags:
only: /.*/
requires:
- build
- checkout
- website_deploy_preview:
context:
- aws
- welcome-ui
requires:
- lint
- test
- website_build
- build_and_release_icon_font
- release_icon_font
- website_deploy_prod:
filters:
branches:
ignore: /.*/
tags:
only: /v6.(\d\d|\d).(\d\d|\d)/
only: /v7.(\d\d|\d).(\d\d|\d)/
context:
- aws
- welcome-ui
requires:
- lint
- test
- website_build
- build_and_release_icon_font
- release_icon_font
- previous_website_versions_build_deploy_prod:
filters:
# should add branches here to keep previous doc version of future majors
branches:
only: /v3|v4|v5/
only: /v3|v4|v5|v6/
context:
- aws
- welcome-ui
requires:
- build
- build_and_release_icon_font
- lint
- test
- website_build
- release_icon_font
- release:
context:
- welcome-ui
requires:
- build
- build_and_release_icon_font
- lint
- test
- website_build
- release_icon_font
filters:
branches:
ignore: /.*/
tags:
only: /v\d.(\d\d|\d).(\d\d|\d)/
- prerelease:
- alpha_release:
context:
- welcome-ui
requires:
- build
- build_and_release_icon_font
- lint
- test
- release_icon_font
filters:
branches:
ignore: /.*/
tags:
only: /v\d.(\d\d|\d).(\d\d|\d)-.*/
- dev_release:
context:
- welcome-ui
requires:
- build
- lint
- test
- release_icon_font
filters:
branches:
ignore: /.*/
tags:
only: /0.0.0-dev...*/
4 changes: 0 additions & 4 deletions .depcheckrc.json

This file was deleted.

27 changes: 27 additions & 0 deletions .dev-releases/publish.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { execSync } from 'child_process'
import { readFileSync, writeFileSync } from 'fs'
import { dirname, join } from 'path'

const __dirname = dirname(new URL(import.meta.url).pathname)
const packageJSONPath = join(dirname(__dirname), 'lib', 'package.json')

const packageJSON = JSON.parse(readFileSync(packageJSONPath, { encoding: 'utf-8' }))

const versionToPublish = process.env.CIRCLE_TAG

console.info(`Found latest tag ${versionToPublish}`)

packageJSON.version = versionToPublish.trim()

console.info('Writing version to package.json...')

writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, 2))

console.info('Done !')
console.info('Publishing ...')

execSync(
'cd /home/circleci/welcome-ui/lib && npm publish --tag dev --registry https://registry.npmjs.org'
)

console.info('Done !')
19 changes: 19 additions & 0 deletions .dev-releases/version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { execSync } from 'child_process'

const date = new Date()

const newVersion = `0.0.0-dev.${date.getTime()}`

console.info(`Tag ${newVersion}...`)

execSync(`cd lib && git tag ${newVersion}`)

console.info('Done !')
console.info('Pushing tags...')

execSync(`git push origin ${newVersion}`)

console.info('Done !')
console.info(
'Visit https://app.circleci.com/pipelines/github/WTTJ/welcome-ui to see your release progress'
)
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
**/node_modules/**
**/dist/**
node_modules/
dist/
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* @WTTJ/welcome-ui-tech-core
packages/ @WTTJ/welcome-ui-tech
lib @WTTJ/welcome-ui-tech
27 changes: 0 additions & 27 deletions .github/workflows/release.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
.env
dist/
website/out
website/.next
.cache/
node_modules/
.DS_Store
.size-snapshot.json
yarn-error.log
lerna-debug.log

# Output of 'npm pack'
*.tgz

# Fonts
packages/IconFont/fonts/
dist/

# vite
vite.config.mjs.*
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn icons:collect && yarn lint && yarn lint:website && yarn test && yarn check:deps
yarn lint && yarn test
Loading