-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor: compile regex only once #3063
Merged
StevenACoffman
merged 1 commit into
99designs:master
from
alexandear:refactor/compile-regex-once
May 9, 2024
Merged
refactor: compile regex only once #3063
StevenACoffman
merged 1 commit into
99designs:master
from
alexandear:refactor/compile-regex-once
May 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-merge-queue bot
pushed a commit
to infratographer/x
that referenced
this pull request
Aug 8, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) | `v0.17.45` -> `v0.17.49` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2f99designs%2fgqlgen/v0.17.49?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2f99designs%2fgqlgen/v0.17.49?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2f99designs%2fgqlgen/v0.17.45/v0.17.49?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2f99designs%2fgqlgen/v0.17.45/v0.17.49?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>99designs/gqlgen (github.com/99designs/gqlgen)</summary> ### [`v0.17.49`](https://github.com/99designs/gqlgen/releases/tag/v0.17.49) [Compare Source](https://github.com/99designs/gqlgen/compare/v0.17.48...v0.17.49) #### What's Changed - chore(deps): bump golang.org/x/text from 0.15.0 to 0.16.0 in /\_examples by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3123 - chore(deps-dev): bump vite from 5.2.12 to 5.2.13 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3126 - chore(deps): bump golang.org/x/text from 0.15.0 to 0.16.0 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3124 - chore(deps): bump golang.org/x/tools from 0.21.0 to 0.22.0 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3125 - Linter update + add revive rules by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3127 - chore(deps): bump github.com/vektah/gqlparser/v2 from 2.5.12 to 2.5.14 in the go_modules group by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3133 - chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /integration in the npm_and_yarn group by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3134 - [#​3118](https://github.com/99designs/gqlgen/issues/3118) Add token limit option to fix CVE-2023-49559 by [@​xaviergodart](https://github.com/xaviergodart) in [99designs/gqlgen#3136 - refactor: add missed file.Close() and use t.TempDir() by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3137 #### New Contributors - [@​xaviergodart](https://github.com/xaviergodart) made their first contribution in [99designs/gqlgen#3136 **Full Changelog**: 99designs/gqlgen@v0.17.48...v0.17.49 ### [`v0.17.48`](https://github.com/99designs/gqlgen/releases/tag/v0.17.48) [Compare Source](https://github.com/99designs/gqlgen/compare/v0.17.47...v0.17.48) #### What's Changed - chore(deps-dev): bump [@​graphql-codegen/client-preset](https://github.com/graphql-codegen/client-preset) from 4.2.5 to 4.2.6 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3084 - chore(deps-dev): bump [@​apollo/client](https://github.com/apollo/client) from 3.10.3 to 3.10.4 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3085 - Embed extra fields config by [@​atzedus](https://github.com/atzedus) in [99designs/gqlgen#3088 - refactor: use 'any' instead of 'interface{}' for consistency by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3090 - refactor: UnmarshalID implementation by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3093 - refactor: simplify with strconv.FormatBool by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3094 - Fix go install gqlgen binary by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3095 - Ignore gorilla/websocket 1.5.1 in dependabot by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3097 - refactor: avoid panic in tests by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3098 - refactor: rename local variables to match Go codestyle by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3100 - refactor: use t.Log instead of fmt.Print by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3099 - Some minor test lint by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3102 - ignore websocket v1.5.1 release for dependabot updates to the \_examples module by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3101 - fix: tests failure, testifylint issues, pin golangci-lint version by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3105 - testifylint v1.3.0 fixes by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3103 - refactor: fix testifylint lint issues in examples by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3107 - Remove duplicated return_pointers_in_unmarshalinput explanation by [@​cirelli94](https://github.com/cirelli94) in [99designs/gqlgen#3109 - Go template function to split string into array of strings. by [@​khudayberdiyev25](https://github.com/khudayberdiyev25) in [99designs/gqlgen#3108 - Correct dataloader example by [@​mpldr](https://github.com/mpldr) in [99designs/gqlgen#3110 - Omit gqlgen version in config files used for tests by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3111 - refactor: use errors.New instead of fmt.Errorf where possible by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3112 - refactor: fix gocritic lint issues by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3113 - add option to omit panic handlers during development by [@​mpldr](https://github.com/mpldr) in [99designs/gqlgen#3114 - chore(deps-dev): bump vite from 5.2.11 to 5.2.12 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3117 #### New Contributors - [@​cirelli94](https://github.com/cirelli94) made their first contribution in [99designs/gqlgen#3109 - [@​khudayberdiyev25](https://github.com/khudayberdiyev25) made their first contribution in [99designs/gqlgen#3108 - [@​mpldr](https://github.com/mpldr) made their first contribution in [99designs/gqlgen#3110 **Full Changelog**: 99designs/gqlgen@v0.17.47...v0.17.48 ### [`v0.17.47`](https://github.com/99designs/gqlgen/releases/tag/v0.17.47) [Compare Source](https://github.com/99designs/gqlgen/compare/v0.17.46...v0.17.47) ##### What's Changed - chore: simplify generating examples in release script by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3064 - refactor: compile regex only once by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3063 - refactor: simplify test asserts by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3061 - Fix typo in error message by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3065 - chore: remove deprecated errcheck.ignore lint option by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3062 - chore(deps): bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3069 - chore(deps): bump google.golang.org/protobuf from 1.34.0 to 1.34.1 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3071 - chore(deps-dev): bump [@​apollo/client](https://github.com/apollo/client) from 3.10.2 to 3.10.3 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3073 - chore(deps-dev): bump urql from 4.0.7 to 4.1.0 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3074 - chore(deps): bump golang.org/x/tools from 0.20.0 to 0.21.0 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3072 - chore(deps): bump github.com/sosodev/duration from 1.3.0 to 1.3.1 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3070 - Fix go mod tidy by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3075 - Ability to inline extraFields configuration. New [@​goExtraField](https://github.com/goExtraField) directive. by [@​atzedus](https://github.com/atzedus) in [99designs/gqlgen#3076 - Federation: Update docs to use IntrospectAndCompose by [@​frankywahl](https://github.com/frankywahl) in [99designs/gqlgen#3077 - bugfix for [@​goField](https://github.com/goField) + [@​goExtraField](https://github.com/goExtraField) combination by [@​atzedus](https://github.com/atzedus) in [99designs/gqlgen#3078 - Fix [#​2856](https://github.com/99designs/gqlgen/issues/2856): resolver receive previous implementation on render by [@​roneli](https://github.com/roneli) in [99designs/gqlgen#2886 - Update gqlparser to v2.5.12 by [@​StevenACoffman](https://github.com/StevenACoffman) in [99designs/gqlgen#3080 **Full Changelog**: 99designs/gqlgen@v0.17.46...v0.17.47 ### [`v0.17.46`](https://github.com/99designs/gqlgen/releases/tag/v0.17.46) [Compare Source](https://github.com/99designs/gqlgen/compare/v0.17.45...v0.17.46) #### What's Changed - Bump [@​apollo/client](https://github.com/apollo/client) from 3.9.6 to 3.9.7 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2970 - Bump vitest from 1.3.1 to 1.4.0 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2972 - Bump vite from 5.1.5 to 5.1.6 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2971 - chore: remove repetitive words by [@​deterclosed](https://github.com/deterclosed) in [99designs/gqlgen#2976 - Bump typescript from 5.4.2 to 5.4.3 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2979 - Bump vite from 5.1.6 to 5.2.6 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2978 - Bump [@​apollo/client](https://github.com/apollo/client) from 3.9.7 to 3.9.9 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2977 - Add UintID type binding by [@​nawivee](https://github.com/nawivee) in [99designs/gqlgen#2980 - Bump [@​graphql-codegen/client-preset](https://github.com/graphql-codegen/client-preset) from 4.2.4 to 4.2.5 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2983 - Bump graphql-sse from 2.5.2 to 2.5.3 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2985 - Bump vite from 5.2.6 to 5.2.7 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2984 - enum values binding by [@​nikitacrit](https://github.com/nikitacrit) in [99designs/gqlgen#2982 - fix: stop loading package dependencies by [@​agratta-silo](https://github.com/agratta-silo) in [99designs/gqlgen#2988 - Bump typescript from 5.4.3 to 5.4.4 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2993 - Bump [@​apollo/client](https://github.com/apollo/client) from 3.9.9 to 3.9.10 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2994 - Update `tools.go` url by [@​38elements](https://github.com/38elements) in [99designs/gqlgen#2987 - Bump vite from 5.2.7 to 5.2.8 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2992 - Bump golang.org/x/tools from 0.19.0 to 0.20.0 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2996 - Bump graphql-ws from 5.15.0 to 5.16.0 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2986 - Bump urql from 4.0.6 to 4.0.7 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#2995 - Mark ctx as unused when no arguments for FieldContextFunc by [@​halkeye](https://github.com/halkeye) in [99designs/gqlgen#2999 - chore: update Automatic Persisted Queries Link by [@​38elements](https://github.com/38elements) in [99designs/gqlgen#3005 - fix: codegen will \_ the fieldset parameter if its not needed by [@​halkeye](https://github.com/halkeye) in [99designs/gqlgen#3006 - Bump vitest from 1.4.0 to 1.5.0 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3012 - Bump typescript from 5.4.4 to 5.4.5 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3010 - Bump [@​apollo/client](https://github.com/apollo/client) from 3.9.10 to 3.9.11 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3011 - Bump vite from 5.2.8 to 5.2.10 in /integration by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3015 - chore: fix some typos in comments by [@​knowmost](https://github.com/knowmost) in [99designs/gqlgen#3020 - chore: remove unused lint.txt by [@​alexandear](https://github.com/alexandear) in [99designs/gqlgen#3017 - Bump golangci/golangci-lint-action from 4.0.0 to 5.0.0 by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3026 - Bump github.com/rs/cors from 1.10.1 to 1.11.0 in /\_examples by [@​dependabot](https://github.com/dependabot) in [99designs/gqlgen#3025 - Bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.2 by [@​dependabot](https://github.com/dependabot) in [
This PR moves out the compiled regexp from the
api.Generate
andClient.newRequest
functions to prevent recompilation each time these functions are called.