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

bug(tools): migrate-converged-pkg generator issues #24304

Open
Hotell opened this issue Aug 9, 2022 · 4 comments
Open

bug(tools): migrate-converged-pkg generator issues #24304

Hotell opened this issue Aug 9, 2022 · 4 comments
Labels
Area: Build System NX: workspace generators Resolution: Soft Close Soft closing inactive issues over a certain period

Comments

@Hotell
Copy link
Contributor

Hotell commented Aug 9, 2022

While migrating all packages to use start-storybook I ran into various issues how things are setup. this issues is aggregate of tracking those

1. compat packages tsconfig.lib.json

  • compat packages are v9 packages that are used in v0 and v8, thus needs to compile to same ECMA target and generate AMD when necessary

incorrectly set to:

"compilerOptions": {
    "target": "ES2019",
    ...
}

should be:

 "target": "ES5",
    "lib": ["es5", "dom"],

2. *.mock file glob support

  • some packages use *.mock. file suffix to be used within tests for mocking purposes (react-dialog)

incorrectly set to :

tsconfig.lib.json

  "exclude": [
    "./src/common/**",
    "**/*.spec.ts",
    "**/*.spec.tsx",
-    "**/*.mock.ts",
-    "**/*.mock.tsx",

tsconfig.spec.json

  "include": [
    "**/*.spec.ts",
-    "**/*.mock.ts",
-   "**/*.mock.tsx",
    "**/*.spec.tsx",
    "**/*.test.ts",
    "**/*.test.tsx",
    "**/*.d.ts"
  ]

should be:

tsconfig.lib.json

  "exclude": [
    "./src/common/**",
    "**/*.spec.ts",
    "**/*.spec.tsx",
    "**/*.mock.ts",
    "**/*.mock.tsx",

tsconfig.spec.json

  "include": [
    "**/*.spec.ts",
    "**/*.mock.ts",
   "**/*.mock.tsx",
    "**/*.spec.tsx",
    "**/*.test.ts",
    "**/*.test.tsx",
    "**/*.d.ts"
  ]

3. .babelrc.json setup

  • if custom preset setup is present it is being overridden

incorrectly set to:

{
-  "presets": [["@griffel", { "modules": [{ "moduleSource": "@griffel/core", "importName": "makeStyles" }] }]],
+  "presets": ["@griffel"],
  "plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"]
}

should be:

{
  "presets": [["@griffel", { "modules": [{ "moduleSource": "@griffel/core", "importName": "makeStyles" }] }]],
  "plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"]
}

4. scope platform:web types setup

  • packages tagged as platform:web should not use node global types within tsconfig.lib.json

@fluentui/global-context us set as platform:web but uses internally global reference - thus needs to have node within types which doesn't adhere to our rules.

current logic:

"compilerOptions": {
-    "types": ["static-assets", "environment", "node"]
+   "types": ["static-assets", "environment"]
  },

topic to discuss: Should we mark these packages rather via platform:any and preserve custom types config ?


Related issues

@JustSlone
Copy link
Collaborator

Removing Needs: Backlog review. Looks like an issue for v-build to track and discuss

@Hotell Hotell changed the title tools: migrate-converged-pkg generator issues bug(tools): migrate-converged-pkg generator issues Nov 1, 2022
@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Apr 30, 2023
@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@microsoft-github-policy-service

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@microsoft-github-policy-service

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Build System NX: workspace generators Resolution: Soft Close Soft closing inactive issues over a certain period
Projects
None yet
Development

No branches or pull requests

4 participants