Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 63 additions & 7 deletions .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@
"scope": "teambit.toolbox",
"version": "0.0.4",
"mainFile": "find-duplications.ts",
"rootDir": "scopes/toolbox/array/duplications-finder"
"rootDir": "scopes/toolbox/array/duplications-finder",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"aspect": {
"name": "aspect",
Expand Down Expand Up @@ -308,7 +314,13 @@
"scope": "teambit.legacy",
"version": "0.0.46",
"mainFile": "index.ts",
"rootDir": "components/legacy/cli/error"
"rootDir": "components/legacy/cli/error",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"cli/webpack-events-listener": {
"name": "cli/webpack-events-listener",
Expand Down Expand Up @@ -583,6 +595,20 @@
"mainFile": "index.ts",
"rootDir": "scopes/workspace/eject"
},
"empty-env": {
"name": "empty-env",
"scope": "",
"version": "",
"defaultScope": "teambit.harmony",
"mainFile": "index.ts",
"rootDir": "scopes/harmony/empty-env",
"config": {
"teambit.harmony/aspect": {},
"teambit.envs/envs": {
"env": "teambit.harmony/aspect"
}
}
},
"entities/lane-diff": {
"name": "entities/lane-diff",
"scope": "teambit.lanes",
Expand Down Expand Up @@ -896,7 +922,13 @@
"scope": "teambit.toolbox",
"version": "0.0.3",
"mainFile": "index.ts",
"rootDir": "scopes/toolbox/json/jsonc-utils"
"rootDir": "scopes/toolbox/json/jsonc-utils",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"lanes": {
"name": "lanes",
Expand Down Expand Up @@ -938,7 +970,13 @@
"scope": "teambit.mcp",
"version": "0.0.10",
"mainFile": "index.ts",
"rootDir": "components/mcp/mcp-config-writer"
"rootDir": "components/mcp/mcp-config-writer",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"mdx": {
"name": "mdx",
Expand Down Expand Up @@ -1064,7 +1102,13 @@
"scope": "teambit.harmony",
"version": "0.0.42",
"mainFile": "feature-toggle.ts",
"rootDir": "scopes/harmony/modules/feature-toggle"
"rootDir": "scopes/harmony/modules/feature-toggle",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"modules/fetch-html-from-url": {
"name": "modules/fetch-html-from-url",
Expand Down Expand Up @@ -1162,7 +1206,13 @@
"scope": "teambit.harmony",
"version": "0.0.3",
"mainFile": "index.ts",
"rootDir": "scopes/harmony/modules/load-trace"
"rootDir": "scopes/harmony/modules/load-trace",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"modules/match-pattern": {
"name": "modules/match-pattern",
Expand All @@ -1183,7 +1233,13 @@
"scope": "teambit.component",
"version": "0.0.74",
"mainFile": "index.ts",
"rootDir": "scopes/component/modules/merge-helper"
"rootDir": "scopes/component/modules/merge-helper",
"config": {
"teambit.harmony/node": {},
"teambit.envs/envs": {
"env": "teambit.harmony/node"
}
}
},
"modules/module-resolver": {
"name": "modules/module-resolver",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';

export class DevFilesEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {

const devFilesEnv = node.compose([
envs.override({
getTestsDevPatterns: () => ['**/*.registered-test.spec.+(js|ts|jsx|tsx)', '**/*.registered-test.test.+(js|ts|jsx|tsx)'],
getDocsDevPatterns: () => ['**/*.custom-docs-suffix.*'],
getCompositionsDevPatterns: () => ['**/*.custom-composition?(s)-suffix.*'],
getDevPatterns: () => ['**/*.custom-dev-file.*']
}),
]);
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const devFilesEnv = aspect.compose(
[
envs.override({
getTestsDevPatterns: () => ['**/*.registered-test.spec.+(js|ts|jsx|tsx)', '**/*.registered-test.test.+(js|ts|jsx|tsx)'],
getDocsDevPatterns: () => ['**/*.custom-docs-suffix.*'],
getCompositionsDevPatterns: () => ['**/*.custom-composition?(s)-suffix.*'],
getDevPatterns: () => ['**/*.custom-dev-file.*']
}),
],
{
async __getDescriptor() {
return { type: 'node' };
},
}
);

envs.registerEnv(devFilesEnv);
return new DevFilesEnv(node);
return new DevFilesEnv(aspect);
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';

export class AddDepsEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {
const addDepsEnv = node.compose([
node.overrideDependencies({
devDependencies: {
"lodash.get": "4.4.2"
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const addDepsEnv = aspect.compose(
[
aspect.overrideDependencies({
devDependencies: {
"lodash.get": "4.4.2"
},
peers: [
{
name: "lodash.zip",
version: '4.2.0',
supportedRange: '^4.0.0'
}]
})
],
{
async __getDescriptor() {
return { type: 'node' };
},
peers: [
{
name: "lodash.zip",
version: '4.2.0',
supportedRange: '^4.0.0'
}]
})
]);
}
);

envs.registerEnv(addDepsEnv);
return new AddDepsEnv(node);
return new AddDepsEnv(aspect);
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
// @bit-no-check
// @ts-nocheck
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';
import get from 'lodash.get'

export class NodeEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {

const nodeEnv = node.compose([]);
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const nodeEnv = aspect.compose([], {
async __getDescriptor() {
return { type: 'node' };
},
});

envs.registerEnv(nodeEnv);
return new NodeEnv(node);
return new NodeEnv(aspect);
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';
import flatten from 'lodash.flatten'

export class NodeEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {


const nodeEnv = node.compose([]);
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const nodeEnv = aspect.compose([], {
async __getDescriptor() {
return { type: 'node' };
},
});

envs.registerEnv(nodeEnv);
return new NodeEnv(node);
return new NodeEnv(aspect);
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';

export class NodeEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {

const nodeEnv = node.compose([]);
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const nodeEnv = aspect.compose([], {
async __getDescriptor() {
return { type: 'node' };
},
});

nodeEnv.getDependencies = () => {
return {
Expand All @@ -19,6 +25,6 @@ export class NodeEnv {
}

envs.registerEnv(nodeEnv);
return new NodeEnv(node);
return new NodeEnv(aspect);
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { EnvsMain, EnvsAspect } from '@teambit/envs';
import { NodeMain, NodeAspect } from '@teambit/node';
import { AspectMain, AspectAspect } from '@teambit/aspect';

export class NodeEnv {
constructor(private node: NodeMain) {}
constructor(private aspect: AspectMain) {}

static dependencies: any = [EnvsAspect, NodeAspect];
static dependencies: any = [EnvsAspect, AspectAspect];

static async provider([envs, node]: [EnvsMain, NodeMain]) {


const nodeEnv = node.compose([]);
static async provider([envs, aspect]: [EnvsMain, AspectMain]) {
// compose on top of the core aspect env. (node/react are no longer core aspects, using them
// would require installing them first). override the descriptor type so components using this
// env are not treated as aspects.
const nodeEnv = aspect.compose([], {
async __getDescriptor() {
return { type: 'node' };
},
});

envs.registerEnv(nodeEnv);
return new NodeEnv(node);
return new NodeEnv(aspect);
}
}
4 changes: 2 additions & 2 deletions contrib/claude-skill-bit-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Subcommands: list, get, set, unset, replace, update
scope <sub-command> - manage component scope names and assignments
Subcommands: set, trust, rename, rename-owner, fork
eject-conf <pattern> - create component.json configuration files for components
local-only <sub-command> - manage components that exist only in the workspace
Subcommands: set, unset, list
aspect <sub-command> - manage component aspects and their configurations
Subcommands: list, list-core, get, set, unset, update
local-only <sub-command> - manage components that exist only in the workspace
Subcommands: set, unset, list

Collaboration & Remote
remote - manage remote scopes for self-hosted environments
Expand Down
2 changes: 1 addition & 1 deletion e2e/harmony/show-harmony.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('bit show command', function () {
});
it('should show Harmony data such as the env', () => {
expect(showOutput).to.include('env');
expect(showOutput).to.include('teambit.harmony/node');
expect(showOutput).to.include('teambit.harmony/empty-env');
});
it('should not import any object to the local scope', () => {
const objects = helper.command.catScope();
Expand Down
Loading