Skip to content

Commit

Permalink
fix(chore,schematics): schematics bundle imports (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikGurev authored Nov 25, 2024
1 parent f7a0007 commit 1513ea4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/schematics/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = [
input: {
'ng-add/index': path.join(__dirname, 'src/ng-add/index.ts'),
'utils/package-config': path.join(__dirname, 'src/utils/package-config.ts'),
'utils/messages': path.join(__dirname, 'src/utils/messages.ts'),
...getMigrations().reduce((res, cur) => {
res[`migrations/${cur}/index`] = path.join(__dirname, `src/migrations/${cur}/index.ts`);
res[`migrations/${cur}/data`] = path.join(__dirname, `src/migrations/${cur}/data.ts`);
Expand Down
1 change: 1 addition & 0 deletions packages/schematics/scripts/copy-meta-to-dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const init = async () => {
}

await copyFileWrapper(resolvePath('../dist/utils/package-config.js'), join(utilsPath, 'package-config.js'));
await copyFileWrapper(resolvePath('../dist/utils/messages.js'), join(utilsPath, 'messages.js'));
};

init().catch((error) => console.error(`Failed to initialize directories and copy files: ${error.message}`));
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ exports[`css-selectors should inform about deprecated colors in the file 1`] = `
[
"
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
../../../../../projects/app/src/styles.scss
Replace with specified rules:
Replace with specified rules:
neutral-white -> <remove from project>
brand-default -> <remove from project>
brand-palette -> <remove from project>
Expand Down Expand Up @@ -38,9 +38,9 @@ Replace with specified rules:
",
"
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
../../../../../projects/app/src/app/app.component.html
Replace with specified rules:
Replace with specified rules:
neutral-white -> <remove from project>
brand-default -> <remove from project>
brand-palette -> <remove from project>
Expand Down Expand Up @@ -77,9 +77,9 @@ exports[`css-selectors should inform about deprecated selectors for fix = false
[
"
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
../../../../../projects/app/src/styles.scss
Replace with specified rules:
Replace with specified rules:
kbq-display-1-strong -> kbq-display-big-strong
kbq-display-2-strong -> kbq-display-normal-strong
kbq-display-3-strong -> kbq-display-compact-strong
Expand Down Expand Up @@ -111,9 +111,9 @@ Pay attention: overwriting is possible. Check the code after automatic replaceme
",
"
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
../../../../../projects/app/src/app/app.component.html
Replace with specified rules:
Replace with specified rules:
kbq-display-1-strong -> kbq-display-big-strong
kbq-display-2-strong -> kbq-display-normal-strong
kbq-display-3-strong -> kbq-display-compact-strong
Expand Down Expand Up @@ -145,9 +145,9 @@ Pay attention: overwriting is possible. Check the code after automatic replaceme
",
"
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
../../../../../projects/app/src/app/app.component.ts
Replace with specified rules:
Replace with specified rules:
kbq-display-1-strong -> kbq-display-big-strong
kbq-display-2-strong -> kbq-display-normal-strong
kbq-display-3-strong -> kbq-display-compact-strong
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/src/migrations/css-selectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function getBaseReplacements(filePath: Path, foundSelectors: ReplaceData[]) {
const parsedFilePath = path.relative(__dirname, `.${filePath}`).replace(/\\/g, '/');
return `
-------------------------
Please pay attention! Found deprecated сss-selectors in file:
Please pay attention! Found deprecated сss-selectors in file:
${parsedFilePath}
Replace with specified rules:
Replace with specified rules:
${foundSelectors.map(({ replace, replaceWith }) => `\t${replace} -> \t${replaceWith}`).join('\n')}
-------------------------
`;
Expand Down

0 comments on commit 1513ea4

Please sign in to comment.