sqrl-lang / sqrl

A safe, stateful rules language for event streams
Apache License 2.0
113 stars 11 forks source link

Ignore re2 import, remove sqrl-text-functions/web #22

Closed meyer closed 1 year ago

meyer commented 2 years ago

Problem

sqrl-text-functions/web exists to work around an re2 import issue.

Solution

I fixed the import in the browser by adding re2: false to config.resolve.alias in our nextjs config file. While I was at it I also tidied up a few loose types.

Result

We can import stuff from sqrl-text-functions and npm run build and npm run dev work without issue.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 3560406879


Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/sqrl-text-functions/src/InProcessPatternService.ts 2 3 66.67%
<!-- Total: 2 3 66.67% -->
Totals Coverage Status
Change from base Build 3556589603: 0.0%
Covered Lines: 15434
Relevant Lines: 23737

💛 - Coveralls
meyer commented 1 year ago

That said it's still useful to have a version of the sqrl-text-functions that doesn't depend on re2? maybe?

I like the config option route that you’re using here. I think we should be able to clean it up a bit more so the webpack override isn’t necessary. I’ll fool around with it a bit in the near future.