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: add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile #6763

Merged
merged 1 commit into from Sep 26, 2020

Conversation

imnotjames
Copy link
Contributor

@imnotjames imnotjames commented Sep 23, 2020

Add browser dummies for FileLogger, ConnectionOptionsReader, and change how we process the *.template files in gulp.

Ideally, we should move away from this whole process for creating browser builds by monkey-patching random parts of TypeORM in this way - such as restructuring the package or finding some other mechanism to make this happen.. but until then, this solves some of the remaining issues with browser builds according to @chriswep

Fixes #6739

@imnotjames imnotjames changed the title add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile fix: add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile Sep 25, 2020
@imnotjames imnotjames marked this pull request as ready for review September 25, 2020 12:28
@imnotjames
Copy link
Contributor Author

imnotjames commented Sep 25, 2020

We still don't have a way to automatically test this kind of thing - technically it wasn't preventing folks from building TypeORM for browsers but it was making the build they'd have to make larger than desirable.

I've been experimenting with a few different techniques for validating the builds but I think our best bet would be to use something like webpack or rollup to generate the browser build - those packages will do static analysis of our project to verify that we aren't pulling in any node specific code. Problem is.. those are a bit more involved of solutions & I was hoping to get this fixed for the next patch release :)

@pleerock pleerock merged commit 180fbd4 into typeorm:master Sep 26, 2020
zaro pushed a commit to zaro/typeorm that referenced this pull request Jan 12, 2021
@imnotjames imnotjames deleted the fix/browser-dummys branch June 21, 2021 00: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.

0.2.26 brakes browser builds (by node-only PlatformTools refactoring commit)
2 participants