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

change policy format for env.jsonc #6780

Merged
merged 9 commits into from
Dec 13, 2022
Merged

change policy format for env.jsonc #6780

merged 9 commits into from
Dec 13, 2022

Conversation

GiladShoham
Copy link
Member

@GiladShoham GiladShoham commented Dec 11, 2022

Proposed Changes

  • change the policy format for env.jsonc
  • make it an array of objects instead of a mix between array and objects.
  • add support for specifying hidden and force on each entry.
  • the new format looks like this:
{
  "policy": {
    "peers": [
      {
        "name": "react",
        /**
          * specific version used for development.
          **/
        "version": "^18.0.0",

        /**
          * range used for the component peer dependencies.
          **/
        "supportedRange": "^17.0.0 || ^18.0.0"
      },
      {
        "name": "react-dom",
        "version": "^18.0.0",
        "supportedRange": "^17.0.0 || ^18.0.0"
      },
      {
        "name": "graphql",
        "version": "14.7.0",
        "supportedRange": "^14.7.0"
      },
      {
        "name": "@mdx-js/react",
        "version": "1.6.22",
        "supportedRange": "^1.6.22"
      },
      {
        "name": "@teambit/mdx.ui.mdx-scope-context",
        "version": "0.0.496",
        "supportedRange": "^0.0.496"
      }
    ],
    /**
      * dev dependencies resolved in the workspace
      * for components using this env. these dependencies would not be defined
      * as a direct component dependencies. they are used for component development only.
      **/
    "dev": [
      {
        "name": "@types/react",
        "version": "^18.0.0",
        "hidden": true,
        "force": true
      },
      {
        "name": "@types/react-dom",
        "version": "^18.0.0",
        "hidden": true,
        "force": true
      },
      {
        "name": "@types/jest",
        "version": "^29.2.2",
        "hidden": true,
        "force": true
      },
      // make ramda a dev in specific version (it is removed from the runtime below)
      {
        "name": "ramda",
        "version": "2.0.0",
      },
    ],
    "runtime": [
      // Force all comps to have babel runtime
      {
        "name": "@babel/runtime",
        "version": "7.20.0",
        "force": true
      },
      // force all components that uses lodash to use specific version
      {
        "name": "lodash",
        "version": "4.0.0",
      },
      // remove ramda as dep for all components (used in the dev to force it be a dev)
      {
        "name": "ramda",
        "version": "-",
        "force": true
      },
    ]
  }
}

@GiladShoham GiladShoham merged commit 4beb432 into master Dec 13, 2022
@GiladShoham GiladShoham deleted the new-env-jsonc-policy branch December 13, 2022 08:29
luvkapur pushed a commit that referenced this pull request Dec 15, 2022
luvkapur added a commit that referenced this pull request Jan 4, 2023
* fixed nav bar item spacing

* implement lane compare drawer

* responsive compare nav

* fix responsive nav

* style fixes

* comp compare changes

* fix loading comp compare

* bump teambit version to 0.0.932 [skip ci]

* usebox z-index fix and preview onload event (#6783)

* commit (#6784)

Co-authored-by: Ran Mizrahi <me@ranmizrahi.com>
Co-authored-by: Gilad Shoham <shoham.gilad@gmail.com>

* change policy format for env.jsonc (#6780)

* bump @teambit/legacy version to 1.0.404 [skip ci]

* bump teambit version to 0.0.933 [skip ci]

* fix: hoisting should not override linked components (#6788)

This fixed for when root components are on and the package manager is set to pnpm

* fix(logger): add pino-pretty via bit-deps-set as it is an implicit dep (#6789)

* fix cycles in getDivergedData

* allow skipping upToDate status or changeType when querying diffStatus

* main runtime changes

* fix tests

* sync with origin/master

* integrate diff status with lane/comp compare

* indicator show changes on a compare tab

* remove ui/compare from .bitmap

* fix comp changes indicator

* fixes

* aggregate changed components

* sync with origin/master

* fork dot-lanes/entities/lane-diff to lanes/entities/lane-diff

* fix bit status

* diffStatus perf refinement

* sync scopes/workspace/install/install.main.runtime.ts with origin/master

* sync with origin/master

* sync with origin/master

* sync with origin/master

* lint fix

* fix z index

* fix deriving NONE

* fix(merge-config): save the pkg-name not the component-id in the conflict files (#6822)

* fix compare widget + calculating new changes

* sync with origin/master

* fix lane switcher styles

* fix: add missing flattened and edges to new snap/tag

* fix lint

* sync with origin/master src/logger/pino-logger.ts

* sync with origin/master

* sync with origin/master

* sync with origin/master

* sync with origin/master

* sync with origin/master

* sync with origin/master scopes/generator/generator/generator.service.tsx

* resolve pr comments

* resolve pr comments

* resolve pr comments

* resolve pr comments

* resolve pr comments

Co-authored-by: odedre <oded.reuveny@gmail.com>
Co-authored-by: Ran Mizrahi <me@ranmizrahi.com>
Co-authored-by: Gilad Shoham <shoham.gilad@gmail.com>
Co-authored-by: CircleCI <ci@bit.dev>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: David First <davidnet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants