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

feat: migrate to nx workspace #1483

Draft
wants to merge 21 commits into
base: dev
Choose a base branch
from

Conversation

JosefBredereck
Copy link
Contributor

@JosefBredereck JosefBredereck commented Feb 12, 2023

Summary of changes:

  1. migrate to Nx workspace
  2. use Nx build scripts
  3. use Nx testing behavior
  4. introduce TypeScript
  5. introduce new @pattern-lab/types package for common types over all packages
  6. rework project structure
  7. remove outdated packages (uikit-polyfills, engine-react, development-edition-engine-react)
  8. added development-edition-engine-twig-php

Open Points

// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare function require(moduleName: string): any;

const findPartialsRE = /{{#?>\s*([\w-/.]+)(?:.|\s+)*?}}/g;

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '{{{{>.' and containing many repetitions of ' '.
}

findPartials(pattern: Pattern): RegExpMatchArray | null {
const matches = pattern.template.match(findPartialsRE);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data

This [regular expression](1) that depends on [library input](2) may run slow on strings starting with '{{{{>.' and with many repetitions of ' '.
}

findPartial(partialString: string): string {
const partial = partialString.replace(findPartialsRE, '$1');

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data

This [regular expression](1) that depends on [library input](2) may run slow on strings starting with '{{{{>.' and with many repetitions of ' '.
}

findPartials(pattern: Pattern): RegExpMatchArray | null {
return pattern.template.match(this.findPartialsRE);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data

This [regular expression](1) that depends on [library input](2) may run slow on strings starting with '{{%from '&'' and with many repetitions of '{{%from "!"'.
@JosefBredereck JosefBredereck mentioned this pull request Feb 12, 2023
10 tasks
@mfranzke
Copy link
Contributor

remove outdated packages (uikit-polyfills, engine-react, development-edition-engine-react)

Is removing engine-react and related packages very important to you? I could think about that actually updating and finalizing these react related packages instead would heavily benefit our popularity and make pattern lab even further attractive by new users.

@JosefBredereck
Copy link
Contributor Author

remove outdated packages (uikit-polyfills, engine-react, development-edition-engine-react)

Is removing engine-react and related packages very important to you? I could think about that actually updating and finalizing these react related packages instead would heavily benefit our popularity and make pattern lab even further attractive by new users.

I know what you want to imply by that, and it surely would improve our overall popularity. But I don't see any of us working on that feature and bring it to the point storybook did. Where you can simply add storybook to your workspace with one command and just include your component.
Therefore, I think we should focus on the static HTML generation engines and not the frameworks. This will give us more time for maintenance and improvements on that front.

@JosefBredereck JosefBredereck self-assigned this Feb 28, 2023
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