Skip to content

Commit b109fa1

Browse files
refactor, move code from @teambit/legacy into existing or new components (teambit#9359)
## Proposed Changes - move legacy constants.ts to teambit.legacy/constants - move legacy logger to teambit.legacy/logger - move src/error into a new component teambit.legacy/cli/error - move src/scope/component-ops/auto-tag.ts to workspace aspect - move src/scope/component-ops/export-scope-components.ts to export aspect - move src/cli/* to cli aspect - move src/global-config/config.ts and src/api/consumer/lib/global-config.ts to teambit.legacy/global-config - move src/consumer/config to teambit.legacy/consumer-config - move legacy scope/actions into teambit.scope/remote-actions - move get-flattened-dependencies.ts and message-per-component.ts to snapping aspect - move src/scope/network to a new component teambit.scope/network - move legacy scope/models and scope/objects into teambit.scope/objects - move snapDistance and getDivergeData and traverse-versions into teambit.component/snap-distance - move src/scope into teambit.legacy/scope - move src/consumer to teambit.legacy/consumer --------- Co-authored-by: Gilad Shoham <[email protected]>
1 parent cb816f6 commit b109fa1

File tree

742 files changed

+2233
-2004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

742 files changed

+2233
-2004
lines changed

.bitmap

Lines changed: 199 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@
303303
"mainFile": "index.ts",
304304
"rootDir": "scopes/toolbox/tables/cli-table"
305305
},
306+
"cli/error": {
307+
"name": "cli/error",
308+
"scope": "",
309+
"version": "",
310+
"defaultScope": "teambit.legacy",
311+
"mainFile": "index.ts",
312+
"rootDir": "components/legacy/cli/error"
313+
},
306314
"cli/prompts": {
307315
"name": "cli/prompts",
308316
"scope": "teambit.legacy",
@@ -457,6 +465,55 @@
457465
"mainFile": "index.ts",
458466
"rootDir": "scopes/workspace/config-merger"
459467
},
468+
"constants": {
469+
"name": "constants",
470+
"scope": "",
471+
"version": "",
472+
"defaultScope": "teambit.legacy",
473+
"mainFile": "constants.ts",
474+
"rootDir": "components/legacy/constants",
475+
"config": {
476+
"teambit.node/envs/[email protected]": {},
477+
"teambit.envs/envs": {
478+
"env": "teambit.node/envs/node-babel-mocha"
479+
}
480+
}
481+
},
482+
"consumer": {
483+
"name": "consumer",
484+
"scope": "",
485+
"version": "",
486+
"defaultScope": "teambit.legacy",
487+
"mainFile": "index.ts",
488+
"rootDir": "components/legacy/consumer",
489+
"config": {
490+
"teambit.node/envs/[email protected]": {},
491+
"teambit.envs/envs": {
492+
"env": "teambit.node/envs/node-babel-mocha"
493+
}
494+
}
495+
},
496+
"consumer-component": {
497+
"name": "consumer-component",
498+
"scope": "teambit.legacy",
499+
"version": "0.0.1",
500+
"mainFile": "index.ts",
501+
"rootDir": "components/legacy/consumer-component"
502+
},
503+
"consumer-config": {
504+
"name": "consumer-config",
505+
"scope": "",
506+
"version": "",
507+
"defaultScope": "teambit.legacy",
508+
"mainFile": "index.ts",
509+
"rootDir": "components/legacy/consumer-config",
510+
"config": {
511+
"teambit.node/envs/[email protected]": {},
512+
"teambit.envs/envs": {
513+
"env": "teambit.node/envs/node-babel-mocha"
514+
}
515+
}
516+
},
460517
"content/cli-reference": {
461518
"name": "content/cli-reference",
462519
"scope": "teambit.harmony",
@@ -534,6 +591,20 @@
534591
"mainFile": "index.ts",
535592
"rootDir": "scopes/harmony/doctor"
536593
},
594+
"e2e-helper": {
595+
"name": "e2e-helper",
596+
"scope": "",
597+
"version": "",
598+
"defaultScope": "teambit.legacy",
599+
"mainFile": "index.ts",
600+
"rootDir": "components/legacy/e2e-helper",
601+
"config": {
602+
"teambit.node/envs/[email protected]": {},
603+
"teambit.envs/envs": {
604+
"env": "teambit.node/envs/node-babel-mocha"
605+
}
606+
}
607+
},
537608
"eject": {
538609
"name": "eject",
539610
"scope": "teambit.workspace",
@@ -702,13 +773,6 @@
702773
"mainFile": "index.ts",
703774
"rootDir": "scopes/git/git"
704775
},
705-
"global-config": {
706-
"name": "global-config",
707-
"scope": "teambit.harmony",
708-
"version": "0.0.1067",
709-
"mainFile": "index.ts",
710-
"rootDir": "scopes/harmony/global-config"
711-
},
712776
"graph": {
713777
"name": "graph",
714778
"scope": "teambit.component",
@@ -891,13 +955,6 @@
891955
"mainFile": "index.ts",
892956
"rootDir": "components/legacy/loader"
893957
},
894-
"logger": {
895-
"name": "logger",
896-
"scope": "teambit.harmony",
897-
"version": "0.0.1157",
898-
"mainFile": "index.ts",
899-
"rootDir": "scopes/harmony/logger"
900-
},
901958
"mdx": {
902959
"name": "mdx",
903960
"scope": "teambit.mdx",
@@ -1045,6 +1102,13 @@
10451102
"mainFile": "index.ts",
10461103
"rootDir": "scopes/html/modules/fetch-html-from-url"
10471104
},
1105+
"modules/find-scope-path": {
1106+
"name": "modules/find-scope-path",
1107+
"scope": "teambit.scope",
1108+
"version": "0.0.1",
1109+
"mainFile": "index.ts",
1110+
"rootDir": "components/modules/find-scope-path"
1111+
},
10481112
"modules/fs-cache": {
10491113
"name": "modules/fs-cache",
10501114
"scope": "teambit.workspace",
@@ -1213,6 +1277,20 @@
12131277
"mainFile": "index.ts",
12141278
"rootDir": "scopes/defender/multi-tester"
12151279
},
1280+
"network": {
1281+
"name": "network",
1282+
"scope": "",
1283+
"version": "",
1284+
"defaultScope": "teambit.scope",
1285+
"mainFile": "index.ts",
1286+
"rootDir": "scopes/scope/network",
1287+
"config": {
1288+
"teambit.node/envs/[email protected]": {},
1289+
"teambit.envs/envs": {
1290+
"env": "teambit.node/envs/node-babel-mocha"
1291+
}
1292+
}
1293+
},
12161294
"network/get-port": {
12171295
"name": "network/get-port",
12181296
"scope": "teambit.toolbox",
@@ -1241,6 +1319,20 @@
12411319
"mainFile": "index.ts",
12421320
"rootDir": "scopes/ui-foundation/notifications/aspect"
12431321
},
1322+
"objects": {
1323+
"name": "objects",
1324+
"scope": "",
1325+
"version": "",
1326+
"defaultScope": "teambit.scope",
1327+
"mainFile": "index.ts",
1328+
"rootDir": "scopes/scope/objects",
1329+
"config": {
1330+
"teambit.node/envs/[email protected]": {},
1331+
"teambit.envs/envs": {
1332+
"env": "teambit.node/envs/node-babel-mocha"
1333+
}
1334+
}
1335+
},
12441336
"overview/api-reference-table-of-contents": {
12451337
"name": "overview/api-reference-table-of-contents",
12461338
"scope": "teambit.api-reference",
@@ -1395,6 +1487,22 @@
13951487
"mainFile": "index.ts",
13961488
"rootDir": "scopes/component/refactoring"
13971489
},
1490+
"remote-actions": {
1491+
"name": "remote-actions",
1492+
"scope": "",
1493+
"version": "",
1494+
"defaultScope": "teambit.scope",
1495+
"mainFile": "index.ts",
1496+
"rootDir": "scopes/scope/remote-actions"
1497+
},
1498+
"remotes": {
1499+
"name": "remotes",
1500+
"scope": "",
1501+
"version": "",
1502+
"defaultScope": "teambit.scope",
1503+
"mainFile": "index.ts",
1504+
"rootDir": "components/scope/remotes"
1505+
},
13981506
"remove": {
13991507
"name": "remove",
14001508
"scope": "teambit.component",
@@ -1563,13 +1671,6 @@
15631671
"mainFile": "index.ts",
15641672
"rootDir": "scopes/semantics/schema"
15651673
},
1566-
"scope": {
1567-
"name": "scope",
1568-
"scope": "teambit.scope",
1569-
"version": "1.0.487",
1570-
"mainFile": "index.ts",
1571-
"rootDir": "scopes/scope/scope"
1572-
},
15731674
"scope-api": {
15741675
"name": "scope-api",
15751676
"scope": "teambit.legacy",
@@ -1605,6 +1706,20 @@
16051706
"mainFile": "index.ts",
16061707
"rootDir": "scopes/scope/sign"
16071708
},
1709+
"snap-distance": {
1710+
"name": "snap-distance",
1711+
"scope": "",
1712+
"version": "",
1713+
"defaultScope": "teambit.component",
1714+
"mainFile": "index.ts",
1715+
"rootDir": "scopes/component/snap-distance",
1716+
"config": {
1717+
"teambit.node/envs/[email protected]": {},
1718+
"teambit.envs/envs": {
1719+
"env": "teambit.node/envs/node-babel-mocha"
1720+
}
1721+
}
1722+
},
16081723
"snapping": {
16091724
"name": "snapping",
16101725
"scope": "teambit.component",
@@ -1682,6 +1797,69 @@
16821797
"mainFile": "index.ts",
16831798
"rootDir": "scopes/api-reference/tagged-exports"
16841799
},
1800+
"teambit.harmony/global-config": {
1801+
"name": "global-config",
1802+
"scope": "teambit.harmony",
1803+
"version": "0.0.1067",
1804+
"mainFile": "index.ts",
1805+
"rootDir": "scopes/harmony/global-config"
1806+
},
1807+
"teambit.harmony/logger": {
1808+
"name": "logger",
1809+
"scope": "teambit.harmony",
1810+
"version": "0.0.1157",
1811+
"mainFile": "index.ts",
1812+
"rootDir": "scopes/harmony/logger"
1813+
},
1814+
"teambit.legacy/global-config": {
1815+
"name": "global-config",
1816+
"scope": "",
1817+
"version": "",
1818+
"defaultScope": "teambit.legacy",
1819+
"mainFile": "index.ts",
1820+
"rootDir": "components/legacy/global-config",
1821+
"config": {
1822+
"teambit.node/envs/[email protected]": {},
1823+
"teambit.envs/envs": {
1824+
"env": "teambit.node/envs/node-babel-mocha"
1825+
}
1826+
}
1827+
},
1828+
"teambit.legacy/logger": {
1829+
"name": "logger",
1830+
"scope": "",
1831+
"version": "",
1832+
"defaultScope": "teambit.legacy",
1833+
"mainFile": "index.ts",
1834+
"rootDir": "components/legacy/logger",
1835+
"config": {
1836+
"teambit.node/envs/[email protected]": {},
1837+
"teambit.envs/envs": {
1838+
"env": "teambit.node/envs/node-babel-mocha"
1839+
}
1840+
}
1841+
},
1842+
"teambit.legacy/scope": {
1843+
"name": "scope",
1844+
"scope": "",
1845+
"version": "",
1846+
"defaultScope": "teambit.legacy",
1847+
"mainFile": "index.ts",
1848+
"rootDir": "components/legacy/scope",
1849+
"config": {
1850+
"teambit.node/envs/[email protected]": {},
1851+
"teambit.envs/envs": {
1852+
"env": "teambit.node/envs/node-babel-mocha"
1853+
}
1854+
}
1855+
},
1856+
"teambit.scope/scope": {
1857+
"name": "scope",
1858+
"scope": "teambit.scope",
1859+
"version": "1.0.487",
1860+
"mainFile": "index.ts",
1861+
"rootDir": "scopes/scope/scope"
1862+
},
16851863
"tester": {
16861864
"name": "tester",
16871865
"scope": "teambit.defender",

.circleci/config.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -382,26 +382,6 @@ jobs:
382382
name: 'notify community slack'
383383
command: 'cd bit && node ./scripts/slack-deploy-notification.js community'
384384

385-
unit_test:
386-
<<: *defaults
387-
steps:
388-
- run:
389-
name: 'save SHA to a file'
390-
command: 'echo $CIRCLE_SHA1 > .circle-sha'
391-
- attach_workspace:
392-
at: ./
393-
- run: 'cd bit && mkdir junit'
394-
- run:
395-
name: 'Run unit tests'
396-
command: 'cd bit && npm run test-circle'
397-
environment:
398-
FORCE_COLOR: 1
399-
MOCHA_FILE: junit/unit-test-results.xml
400-
when: always
401-
- store_test_results:
402-
path: bit/junit
403-
- store_artifacts:
404-
path: bit/junit
405385

406386
lint:
407387
<<: *defaults
@@ -519,11 +499,11 @@ jobs:
519499
path: bit/yarn.lock
520500

521501
bit_build:
522-
resource_class: xlarge
502+
resource_class: 2xlarge
523503
<<: *defaults
524504
environment:
525505
BIT_FEATURES: cloud-importer-v2
526-
NODE_OPTIONS: --max-old-space-size=15000
506+
NODE_OPTIONS: --max-old-space-size=30000
527507
steps:
528508
- attach_workspace:
529509
at: ./
@@ -555,16 +535,16 @@ jobs:
555535
name: 'bit build'
556536
command: 'cd bit && bit build'
557537
environment:
558-
NODE_OPTIONS: --max-old-space-size=15000
538+
NODE_OPTIONS: --max-old-space-size=30000
559539
- store_artifacts:
560540
path: ~/Library/Caches/Bit/logs
561541

562542
bit_tag:
563-
resource_class: xlarge
543+
resource_class: 2xlarge
564544
<<: *defaults
565545
environment:
566546
BIT_FEATURES: cloud-importer-v2
567-
NODE_OPTIONS: --max-old-space-size=15000
547+
NODE_OPTIONS: --max-old-space-size=30 000
568548
steps:
569549
- attach_workspace:
570550
at: ./
@@ -586,7 +566,7 @@ jobs:
586566
- run:
587567
name: setting npmjs registry with publishing permission
588568
command: echo "//registry.npmjs.org/:_authToken=${npmjsRegistryToken}" >> ~/.npmrc
589-
- run: cd bit && node scripts/bump-bit-legacy-ver.js
569+
# - run: cd bit && node scripts/bump-bit-legacy-ver.js
590570
- run: bvm link
591571
- run: cd bit && bit config set force_local_build true
592572
# temporary, check if we can remove it
@@ -1249,9 +1229,6 @@ workflows:
12491229
requires:
12501230
- set_npm_registries
12511231
- checkout_code
1252-
- unit_test:
1253-
requires:
1254-
- setup_harmony
12551232
- lint:
12561233
requires:
12571234
- setup_harmony

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
e2e/fixtures
3+
components/legacy/e2e-helper/fixtures
34
scopes/semantics/schema/mock
45

56
# A temp file should be required from outside (via npm) so no point to fix it

0 commit comments

Comments
 (0)