-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Problem
Starting with installation of dependencies ending with releasing our product to partners... we rely heavily on contents within scripts/ folder.
Historically functionality was added here adhoc without being compliant to any style-guide, tests coverage, type checking, out-dated files, which made scripts/ a kind of a black box.
This approach won't scale as we are going forward. Instead of continuing adding technical depth and making it hard to maintain we need to apply similar quality and structure to scripts/ as we apply for our component packages.
Solution
- enable strict type checking
- establish package boundaries within
scripts/ - move "packaged" scripts sub-folders to separate packages to establish explicit public API's contracts
Example (simplified):
Now:
|- scripts/
|- |- api-extractor/
|- |- beachball/
|- |- cypress/
|- |- screener/
import { someFn } from '@fluentui/scripts/cypress/one/two
After:
|- packages/
|- |- tools/
|- |- |- api-extractor/
|- |- |- beachball/
|- |- |- cypress/
|- |- |- screener/
import { someFn } from '@fluentui/cypress
Outlined steps will enable us to ship components with high confidence and also as a performance side-effect will improve our PR CI pipelines times as there wont be one monolithic scrips packages which affects whole monorepo.
Risks (Rabbit holes)
Out of scope (No-gos)
Tasks
- chore(scripts): enable type-checks on ci and fix all ts-errors #24264
- feat(scripts): establish ts solution config and initial package boundaries #24345
- feat(scripts): enable strict checking for additional sub-folders(packages) #24526
- feat(scripts): enable strict checking for additional sub-folders(packages) v3 #25074
- enable checks for create-* folders / feat(scripts): enable strict checking for additional sub-folders(packages) v4 #25710
- move root files to proper domain/sub-folder / feat(scripts): enable strict checking for additional sub-folders(packages) v4 #25710
- enable checks for all root files
- prepare sub-folders for packaging (domain boundaries)
- refactor(scripts): encapsulate v0 and v8 tooling within its domain boundaries #25738
- chore(scripts): remove deep imports from /scripts/tasks/* #26099
- refactor(scripts): introduce barrel api within
/jest#26100 - chore: introduce more barrel file apis within
/scripts#26125 - chore(scripts): remove type declaration duplication within /scripts/monorepo and remove non public API #26139
- chore(scripts): introduce ts-node sub-package #26109
- refactor(scripts): separate
/storybookand/webpackand introduce barrel api within/webpack#26072 - refactor(scripts): more domain boundaries encapsulation #25851
- refactor(scripts): move executors from
/monorepoto proper domain #26345
- migrate [sub-folder] to [package] (this will contain multiple sub-tasks)