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

fix import scanner #231

Merged
merged 1 commit into from
Mar 1, 2020
Merged

fix import scanner #231

merged 1 commit into from
Mar 1, 2020

Conversation

FredKSchott
Copy link
Owner

Our new import scanner regex was too strict about whitespace, and wasn't properly matching newline characters in statements like these:

import {
    SvelteComponent as e,
    create_component as t,
    destroy_component as n,
    init as o,
    mount_component as r,
    noop as s,
    safe_not_equal as m,
    transition_in as l,
    transition_out as u,
} from '/web_modules/svelte/internal.js';

The /s regex flag does most of the work in this PR, along with some other Regex fixes.

meta point: we're very integration-test heavy (which I like!) but this would be a good area to invest in unit tests of the actual scanner itself.

@FredKSchott FredKSchott merged commit 7f239d3 into master Mar 1, 2020
@FredKSchott FredKSchott deleted the fix-import-scanner branch March 1, 2020 02:10
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.

1 participant