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

Migration/4.0 #1209

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Migration/4.0 #1209

merged 1 commit into from
Nov 2, 2021

Conversation

rvilarl
Copy link
Collaborator

@rvilarl rvilarl commented Oct 31, 2021

Issues 1 & 2 described in #1200 resolved:

  1. imports without path -> Solution: Path added
  2. legacy fonts in src directory -> Solution: Legacy moved to tools/fonts/
  3. @Bravura, @gonville, @petaluma ... -> Workaround: change to './fonts/loadStatic'

3 needs still to be resolved

eslint warnings resolved

@ronyeh
Copy link
Collaborator

ronyeh commented Oct 31, 2021

Sorry, maybe it's late and I don't understand. :-)

Are any of these fixes duplicated in my other PR about build process, and also my Font PR? I don't want to have us overwriting each others changes when a merge happens.

@ronyeh
Copy link
Collaborator

ronyeh commented Oct 31, 2021

For example, I also moved the legacy font tools out, and I also updated them to work again with the new Font PR branch. I anticipate some bad rebase / merges coming soon :-}.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 31, 2021

No this independent. You asked me to give it a go with npm link. This the changes I had to make it work see #1200. Of course I placed out the fonts where you did.

Changes apart from including the path in the imports are minor in this PR.

@ronyeh
Copy link
Collaborator

ronyeh commented Oct 31, 2021

Hey if you have time can you try npm linking to my setFont branch? I just tested today's rebase over master, and it is showing no visual diffs.

I'd like to see what public API things I may have broken, and which things my branch does better than the current master.

Unfortunately I don't have a fancy app like yours to integrate with my branch. Your app is very nice! I'll try to some musicxml with it next week.

Here's my branch:
https://github.com/ronyeh/vexflow/tree/setFont

I'm currently reviewing your setFontMinor PR, and then I'll head to bed.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 31, 2021

I did it already, results are in #1200 have a look there :) you just made a commit, it should be no difference but I will give it a try also

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 31, 2021

legacy changes merged from #1163 to avoid files being overwritten
@ronyeh this should no longer have overwrite problems, thanks for the tip

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 31, 2021

@0xfe ready to review

@ronyeh
Copy link
Collaborator

ronyeh commented Oct 31, 2021

We should try to solve the @xxxxx paths issue before proceeding I think. Here is a related discussion. microsoft/TypeScript#25677

I need to do more research as I'm sure someone has developed a solution via a webpack plugin or something.

In my font PR, I've consolidated your

@bravura
@gonville
@petaluma
@custom

into a single

@loadFonts

Since your @ paths before were all pointed to the same module anyways.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Nov 1, 2021

We should try to solve the @xxxxx paths issue before proceeding I think. Here is a related discussion. microsoft/TypeScript#25677

I need to do more research as I'm sure someone has developed a solution via a webpack plugin or something.

In my font PR, I've consolidated your

@bravura
@gonville
@petaluma
@custom

into a single

@loadFonts

Since your @ paths before were all pointed to the same module anyways.

I left them separted to allow possible combinations (ie.: Brabura static and others dynamic) In any case this is not related to this PR. :)

@rvilarl
Copy link
Collaborator Author

rvilarl commented Nov 1, 2021

@0xfe Ready to review

@rvilarl rvilarl mentioned this pull request Nov 1, 2021
@ronyeh ronyeh added the 4.0 label Nov 1, 2021
@ronyeh
Copy link
Collaborator

ronyeh commented Nov 2, 2021

I'd recommend that this is the next PR to be reviewed and merged. I'm happy to be the last blocker for shipping a 4.0 beta. 🥇 hahah. But I think we are close. Rodrigo has been testing some of my recent builds with his PianoPlay project.

@0xfe
Copy link
Owner

0xfe commented Nov 2, 2021

Thanks for this. Looks good. Merging. (Is there a tslint plugin that will auto-order the imports?)

@0xfe 0xfe merged commit 365e81e into 0xfe:master Nov 2, 2021
@rvilarl
Copy link
Collaborator Author

rvilarl commented Nov 2, 2021

@0xfe yes! it is already merged #1195 ! All was sorted automatically!

@ronyeh
Copy link
Collaborator

ronyeh commented Nov 2, 2021

Thanks for this. Looks good. Merging. (Is there a tslint plugin that will auto-order the imports?)

Yes, we discussed last week and Rodrigo and I chose the "eslint-plugin-simple-import-sort": "^7.0.0".

It has just a few options that you can set in .eslintrc. In my Fonts branch, I'm now using the config below. It will autofix imports, combine duplicates if possible, add newlines, and sort them based on your provided array of regex. I just used the default sort order, but moved the two imports that start with "vex***" to the top.

    "import/first": "error",
    "import/no-duplicates": "error",
    "import/newline-after-import": "warn"

.......

        "simple-import-sort/imports": [
          "warn",
          {
            "groups": [
              // Vex goes first!
              ["^.*/vex$"],
              ["^.*/vexflow_test_helpers$"],
              // Side effect imports.
              ["^\\u0000"],
              // Packages.
              // Things that start with a letter (or digit or underscore), or `@` followed by a letter.
              ["^@?\\w"],
              // Absolute imports and other imports such as Vue-style `@/foo`.
              // Anything not matched in another group.
              ["^"],
              // All other relative imports (anything that starts with a dot).
              ["^\\."]
            ]
          }

ronyeh added a commit to ronyeh/vexflow4 that referenced this pull request Nov 3, 2021
Includes relative path imports for test files from:
0xfe#1209
ronyeh added a commit to ronyeh/vexflow4 that referenced this pull request Nov 4, 2021
Includes relative path imports for test files from:
0xfe#1209
@rvilarl rvilarl deleted the migration/4.0 branch December 27, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants