Sharing Helper Code Between Package.swift Files

Sorry, I misunderstood your question.(I thought you'd like to share code between different normal Swift Targets)

As @0xTim said, it is currently not possible to share code between multiple Package.swift files.

And actually, I have the same issue here.

I have a helper function defined at Package.Dependency and I'd like to use it on multi package files.
Can we prefer local package and fallback to url package - #2 by Kyle-Ye

The current solution for me is to manually copy and paste the contents to different Package.swift files (Or we use a tool to manage and append the helper func to different Package.swift files)