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(@schematics/angular): add migration to remove require calls from karma builder main file #23955

Merged
merged 2 commits into from Sep 26, 2022

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Sep 26, 2022

With the recent changes in build-angular the require.context calls have become unneeded.

BREAKING CHANGE: require.context are no longer parsed. Webpack specific features are not supported nor guaranteed to work in the future.

@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Sep 26, 2022
@alan-agius4 alan-agius4 added this to the v15 Feature Freeze milestone Sep 26, 2022
@angular-robot angular-robot bot added the feature Issue that requests a new feature label Sep 26, 2022
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 26, 2022
@@ -342,8 +342,7 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise<Config
strictExportPresence: true,
parser: {
javascript: {
// TODO(alanagius): disable the below once we have a migration to remove `require.context` from test.ts file in users projects.
requireContext: true,
requireContext: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is not an officially supported feature, we might want to add a breaking change notice to let users know that this Webpack specific feature will definitely not work anymore. (And maybe reiterate that Webpack specific features are not guaranteed to work in the future.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s do that.

… karma builder main file

With the recent changes in build-angular the `require.context` calls have become unneeded.
…sing

`require.context` is a webpack specific feature which was only needed to support the old Karma test setup.

BREAKING CHANGE: `require.context` are no longer parsed. Webpack specific features are not supported nor guaranteed to work in the future.
@alan-agius4 alan-agius4 merged commit f393b09 into angular:main Sep 26, 2022
@alan-agius4 alan-agius4 deleted the remove-require-calls branch September 26, 2022 15:39
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 26, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker feature Issue that requests a new feature flag: breaking change target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants