@aws-amplify/graphql-model-transformer 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/definitions.d.ts.map +1 -1
  3. package/lib/definitions.js +28 -2
  4. package/lib/definitions.js.map +1 -1
  5. package/lib/graphql-model-transformer.d.ts.map +1 -1
  6. package/lib/graphql-model-transformer.js +37 -35
  7. package/lib/graphql-model-transformer.js.map +1 -1
  8. package/lib/graphql-types/common.d.ts.map +1 -1
  9. package/lib/graphql-types/common.js +16 -18
  10. package/lib/graphql-types/common.js.map +1 -1
  11. package/lib/graphql-types/mutation.js +12 -12
  12. package/lib/graphql-types/mutation.js.map +1 -1
  13. package/lib/rds-lambda.zip +0 -0
  14. package/lib/resolvers/common.d.ts.map +1 -1
  15. package/lib/resolvers/common.js.map +1 -1
  16. package/lib/resolvers/dynamodb/mutation.d.ts.map +1 -1
  17. package/lib/resolvers/dynamodb/mutation.js +10 -8
  18. package/lib/resolvers/dynamodb/mutation.js.map +1 -1
  19. package/lib/resolvers/dynamodb/query.d.ts.map +1 -1
  20. package/lib/resolvers/dynamodb/query.js +1 -4
  21. package/lib/resolvers/dynamodb/query.js.map +1 -1
  22. package/lib/resolvers/dynamodb/subscriptions.d.ts.map +1 -1
  23. package/lib/resolvers/dynamodb/subscriptions.js.map +1 -1
  24. package/lib/resolvers/generators/rds-vtl-generator.d.ts.map +1 -1
  25. package/lib/resolvers/generators/rds-vtl-generator.js.map +1 -1
  26. package/lib/resolvers/generators/vtl-generator.d.ts.map +1 -1
  27. package/lib/resolvers/index.d.ts.map +1 -1
  28. package/lib/resolvers/index.js.map +1 -1
  29. package/lib/resolvers/rds/mutation.d.ts.map +1 -1
  30. package/lib/resolvers/rds/mutation.js.map +1 -1
  31. package/lib/resolvers/rds/query.d.ts.map +1 -1
  32. package/lib/resolvers/rds/query.js.map +1 -1
  33. package/lib/resolvers/rds/resolver.d.ts.map +1 -1
  34. package/lib/resolvers/rds/resolver.js +1 -1
  35. package/lib/resolvers/rds/resolver.js.map +1 -1
  36. package/lib/resources/dynamo-model-resource-generator.d.ts.map +1 -1
  37. package/lib/resources/dynamo-model-resource-generator.js.map +1 -1
  38. package/lib/resources/model-resource-generator.d.ts.map +1 -1
  39. package/lib/resources/model-resource-generator.js +12 -4
  40. package/lib/resources/model-resource-generator.js.map +1 -1
  41. package/lib/resources/rds-model-resource-generator.d.ts.map +1 -1
  42. package/lib/resources/rds-model-resource-generator.js +1 -1
  43. package/lib/resources/rds-model-resource-generator.js.map +1 -1
  44. package/package.json +6 -6
  45. package/rds-lambda/node_modules/.package-lock.json +209 -221
  46. package/rds-lambda/node_modules/@aws-sdk/client-ssm/package.json +17 -18
  47. package/rds-lambda/node_modules/@aws-sdk/client-sso/package.json +14 -15
  48. package/rds-lambda/node_modules/@aws-sdk/client-sso-oidc/package.json +14 -15
  49. package/rds-lambda/node_modules/@aws-sdk/client-sts/package.json +17 -18
  50. package/rds-lambda/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  51. package/rds-lambda/node_modules/@aws-sdk/credential-provider-ini/package.json +6 -6
  52. package/rds-lambda/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  53. package/rds-lambda/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  54. package/rds-lambda/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  55. package/rds-lambda/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
  56. package/rds-lambda/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
  57. package/rds-lambda/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  58. package/rds-lambda/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
  59. package/rds-lambda/node_modules/@aws-sdk/middleware-sdk-sts/package.json +3 -3
  60. package/rds-lambda/node_modules/@aws-sdk/middleware-signing/package.json +2 -2
  61. package/rds-lambda/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
  62. package/rds-lambda/node_modules/@aws-sdk/token-providers/package.json +3 -3
  63. package/rds-lambda/node_modules/@aws-sdk/types/package.json +2 -1
  64. package/rds-lambda/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
  65. package/rds-lambda/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
  66. package/rds-lambda/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  67. package/rds-lambda/node_modules/@babel/compat-data/data/plugin-bugfixes.json +2 -0
  68. package/rds-lambda/node_modules/@babel/compat-data/data/plugins.json +8 -0
  69. package/rds-lambda/node_modules/@babel/compat-data/package.json +1 -1
  70. package/rds-lambda/node_modules/@babel/core/package.json +7 -7
  71. package/rds-lambda/node_modules/@babel/generator/package.json +2 -2
  72. package/rds-lambda/node_modules/@babel/helper-compilation-targets/package.json +5 -5
  73. package/rds-lambda/node_modules/@babel/helper-module-transforms/README.md +1 -1
  74. package/rds-lambda/node_modules/@babel/helper-module-transforms/package.json +10 -6
  75. package/rds-lambda/node_modules/@types/jest/README.md +1 -1
  76. package/rds-lambda/node_modules/@types/jest/package.json +2 -2
  77. package/rds-lambda/node_modules/@types/node/README.md +1 -1
  78. package/rds-lambda/node_modules/@types/node/package.json +2 -2
  79. package/rds-lambda/node_modules/caniuse-lite/package.json +1 -1
  80. package/rds-lambda/node_modules/commander/Readme.md +7 -2
  81. package/rds-lambda/node_modules/commander/package.json +17 -17
  82. package/rds-lambda/node_modules/electron-to-chromium/full-chromium-versions.json +1 -1
  83. package/rds-lambda/node_modules/electron-to-chromium/full-versions.json +1 -1
  84. package/rds-lambda/node_modules/electron-to-chromium/package.json +1 -1
  85. package/rds-lambda/node_modules/electron-to-chromium/versions.json +1 -1
  86. package/rds-lambda/node_modules/knex/CHANGELOG.md +63 -21
  87. package/rds-lambda/node_modules/knex/CONTRIBUTING.md +1 -1
  88. package/rds-lambda/node_modules/knex/LICENSE +22 -22
  89. package/rds-lambda/node_modules/knex/README.md +32 -31
  90. package/rds-lambda/node_modules/knex/UPGRADING.md +94 -82
  91. package/rds-lambda/node_modules/knex/knex.mjs +11 -0
  92. package/rds-lambda/node_modules/knex/lib/dialects/oracle/DEAD_CODE.md +3 -3
  93. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/cjs.stub +15 -15
  94. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/coffee.stub +13 -13
  95. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/eg.stub +14 -14
  96. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/js-schema.stub +22 -22
  97. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/js.stub +22 -22
  98. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-coffee.stub +34 -34
  99. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-eg.stub +43 -43
  100. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-js.stub +47 -47
  101. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-ls.stub +35 -35
  102. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-ts.stub +47 -47
  103. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ls.stub +14 -14
  104. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/mjs.stub +23 -23
  105. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ts-schema.stub +21 -21
  106. package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ts.stub +21 -21
  107. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/coffee.stub +9 -9
  108. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/eg.stub +11 -11
  109. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/js.stub +13 -13
  110. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/ls.stub +11 -11
  111. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/mjs.stub +12 -12
  112. package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/ts.stub +13 -13
  113. package/rds-lambda/node_modules/knex/package.json +21 -18
  114. package/rds-lambda/node_modules/knex/scripts/docker-compose.yml +2 -2
  115. package/rds-lambda/node_modules/knex/scripts/next-release-howto.md +1 -1
  116. package/rds-lambda/node_modules/knex/scripts/oracledb-install-driver-libs.sh +82 -82
  117. package/rds-lambda/node_modules/knex/scripts/release.sh +36 -34
  118. package/rds-lambda/node_modules/knex/scripts/stress-test/README.txt +18 -18
  119. package/rds-lambda/node_modules/knex/scripts/stress-test/docker-compose.yml +16 -16
  120. package/rds-lambda/node_modules/pg-connection-string/package.json +2 -2
  121. package/rds-lambda/node_modules/semver/package.json +19 -9
  122. package/rds-lambda/package-lock.json +209 -221
  123. package/src/__tests__/model-transformer.test.ts +130 -139
  124. package/src/__tests__/test-utils/helpers.ts +1 -1
  125. package/src/__tests__/test-utils/rds_utils.test.ts +29 -68
  126. package/src/definitions.ts +28 -2
  127. package/src/graphql-model-transformer.ts +72 -74
  128. package/src/graphql-types/common.ts +41 -41
  129. package/src/graphql-types/mutation.ts +12 -12
  130. package/src/resolvers/common.ts +1 -12
  131. package/src/resolvers/dynamodb/mutation.ts +16 -13
  132. package/src/resolvers/dynamodb/query.ts +6 -12
  133. package/src/resolvers/dynamodb/subscriptions.ts +1 -3
  134. package/src/resolvers/generators/rds-vtl-generator.ts +1 -4
  135. package/src/resolvers/generators/vtl-generator.ts +5 -5
  136. package/src/resolvers/index.ts +1 -3
  137. package/src/resolvers/rds/mutation.ts +17 -6
  138. package/src/resolvers/rds/query.ts +4 -12
  139. package/src/resolvers/rds/resolver.ts +8 -13
  140. package/src/resources/dynamo-model-resource-generator.ts +12 -22
  141. package/src/resources/model-resource-generator.ts +54 -24
  142. package/src/resources/rds-model-resource-generator.ts +9 -23
  143. package/tsconfig.json +4 -4
  144. package/tsconfig.tsbuildinfo +1 -1
  145. package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/CHANGELOG.md +0 -70
  146. package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/LICENSE +0 -15
  147. package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/README.md +0 -454
  148. package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/package.json +0 -28
  149. package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/range.bnf +0 -16
  150. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/LICENSE +0 -21
  151. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/README.md +0 -77
  152. package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/package.json +0 -40
  153. package/rds-lambda/node_modules/semver/CHANGELOG.md +0 -70
@@ -1,70 +0,0 @@
1
- # changes log
2
-
3
- ## 6.2.0
4
-
5
- * Coerce numbers to strings when passed to semver.coerce()
6
- * Add `rtl` option to coerce from right to left
7
-
8
- ## 6.1.3
9
-
10
- * Handle X-ranges properly in includePrerelease mode
11
-
12
- ## 6.1.2
13
-
14
- * Do not throw when testing invalid version strings
15
-
16
- ## 6.1.1
17
-
18
- * Add options support for semver.coerce()
19
- * Handle undefined version passed to Range.test
20
-
21
- ## 6.1.0
22
-
23
- * Add semver.compareBuild function
24
- * Support `*` in semver.intersects
25
-
26
- ## 6.0
27
-
28
- * Fix `intersects` logic.
29
-
30
- This is technically a bug fix, but since it is also a change to behavior
31
- that may require users updating their code, it is marked as a major
32
- version increment.
33
-
34
- ## 5.7
35
-
36
- * Add `minVersion` method
37
-
38
- ## 5.6
39
-
40
- * Move boolean `loose` param to an options object, with
41
- backwards-compatibility protection.
42
- * Add ability to opt out of special prerelease version handling with
43
- the `includePrerelease` option flag.
44
-
45
- ## 5.5
46
-
47
- * Add version coercion capabilities
48
-
49
- ## 5.4
50
-
51
- * Add intersection checking
52
-
53
- ## 5.3
54
-
55
- * Add `minSatisfying` method
56
-
57
- ## 5.2
58
-
59
- * Add `prerelease(v)` that returns prerelease components
60
-
61
- ## 5.1
62
-
63
- * Add Backus-Naur for ranges
64
- * Remove excessively cute inspection methods
65
-
66
- ## 5.0
67
-
68
- * Remove AMD/Browserified build artifacts
69
- * Fix ltr and gtr when using the `*` range
70
- * Fix for range `*` with a prerelease identifier
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,454 +0,0 @@
1
- semver(1) -- The semantic versioner for npm
2
- ===========================================
3
-
4
- > This repo is a fork to backport [717534ee353682f3bcf33e60a8af4292626d4441](https://github.com/npm/node-semver/commit/717534ee353682f3bcf33e60a8af4292626d4441) to version 6.
5
- >
6
- > Manually tested on:
7
- > - Node.js 6.17.1 with tap 12 (running `npm run test 'test/*'`).
8
- > 4 tests are failing because they use the `resolveMatchSnapshot` function,
9
- > introduced in a newer tap version
10
- > - Node.js 14.21.3 with tap 14
11
- > - Node.js 20.3.1 with tap 16
12
- > 3 tests in `test/cli.js` are failling with `child test left in queue:`,
13
- > because the async tests API has changed in recent tap versions
14
-
15
- ## Install
16
-
17
- ```bash
18
- npm install @nicolo-ribaudo/semver-v6
19
- ````
20
-
21
- ## Usage
22
-
23
- As a node module:
24
-
25
- ```js
26
- const semver = require('@nicolo-ribaudo/semver-v6')
27
-
28
- semver.valid('1.2.3') // '1.2.3'
29
- semver.valid('a.b.c') // null
30
- semver.clean(' =v1.2.3 ') // '1.2.3'
31
- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
32
- semver.gt('1.2.3', '9.8.7') // false
33
- semver.lt('1.2.3', '9.8.7') // true
34
- semver.minVersion('>=1.0.0') // '1.0.0'
35
- semver.valid(semver.coerce('v2')) // '2.0.0'
36
- semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
37
- ```
38
-
39
- As a command-line utility:
40
-
41
- ```
42
- $ semver -h
43
-
44
- A JavaScript implementation of the https://semver.org/ specification
45
- Copyright Isaac Z. Schlueter
46
-
47
- Usage: semver [options] <version> [<version> [...]]
48
- Prints valid versions sorted by SemVer precedence
49
-
50
- Options:
51
- -r --range <range>
52
- Print versions that match the specified range.
53
-
54
- -i --increment [<level>]
55
- Increment a version by the specified level. Level can
56
- be one of: major, minor, patch, premajor, preminor,
57
- prepatch, or prerelease. Default level is 'patch'.
58
- Only one version may be specified.
59
-
60
- --preid <identifier>
61
- Identifier to be used to prefix premajor, preminor,
62
- prepatch or prerelease version increments.
63
-
64
- -l --loose
65
- Interpret versions and ranges loosely
66
-
67
- -p --include-prerelease
68
- Always include prerelease versions in range matching
69
-
70
- -c --coerce
71
- Coerce a string into SemVer if possible
72
- (does not imply --loose)
73
-
74
- --rtl
75
- Coerce version strings right to left
76
-
77
- --ltr
78
- Coerce version strings left to right (default)
79
-
80
- Program exits successfully if any valid version satisfies
81
- all supplied ranges, and prints all satisfying versions.
82
-
83
- If no satisfying versions are found, then exits failure.
84
-
85
- Versions are printed in ascending order, so supplying
86
- multiple versions to the utility will just sort them.
87
- ```
88
-
89
- ## Versions
90
-
91
- A "version" is described by the `v2.0.0` specification found at
92
- <https://semver.org/>.
93
-
94
- A leading `"="` or `"v"` character is stripped off and ignored.
95
-
96
- ## Ranges
97
-
98
- A `version range` is a set of `comparators` which specify versions
99
- that satisfy the range.
100
-
101
- A `comparator` is composed of an `operator` and a `version`. The set
102
- of primitive `operators` is:
103
-
104
- * `<` Less than
105
- * `<=` Less than or equal to
106
- * `>` Greater than
107
- * `>=` Greater than or equal to
108
- * `=` Equal. If no operator is specified, then equality is assumed,
109
- so this operator is optional, but MAY be included.
110
-
111
- For example, the comparator `>=1.2.7` would match the versions
112
- `1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
113
- or `1.1.0`.
114
-
115
- Comparators can be joined by whitespace to form a `comparator set`,
116
- which is satisfied by the **intersection** of all of the comparators
117
- it includes.
118
-
119
- A range is composed of one or more comparator sets, joined by `||`. A
120
- version matches a range if and only if every comparator in at least
121
- one of the `||`-separated comparator sets is satisfied by the version.
122
-
123
- For example, the range `>=1.2.7 <1.3.0` would match the versions
124
- `1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
125
- or `1.1.0`.
126
-
127
- The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
128
- `1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
129
-
130
- ### Prerelease Tags
131
-
132
- If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
133
- it will only be allowed to satisfy comparator sets if at least one
134
- comparator with the same `[major, minor, patch]` tuple also has a
135
- prerelease tag.
136
-
137
- For example, the range `>1.2.3-alpha.3` would be allowed to match the
138
- version `1.2.3-alpha.7`, but it would *not* be satisfied by
139
- `3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
140
- than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
141
- range only accepts prerelease tags on the `1.2.3` version. The
142
- version `3.4.5` *would* satisfy the range, because it does not have a
143
- prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
144
-
145
- The purpose for this behavior is twofold. First, prerelease versions
146
- frequently are updated very quickly, and contain many breaking changes
147
- that are (by the author's design) not yet fit for public consumption.
148
- Therefore, by default, they are excluded from range matching
149
- semantics.
150
-
151
- Second, a user who has opted into using a prerelease version has
152
- clearly indicated the intent to use *that specific* set of
153
- alpha/beta/rc versions. By including a prerelease tag in the range,
154
- the user is indicating that they are aware of the risk. However, it
155
- is still not appropriate to assume that they have opted into taking a
156
- similar risk on the *next* set of prerelease versions.
157
-
158
- Note that this behavior can be suppressed (treating all prerelease
159
- versions as if they were normal versions, for the purpose of range
160
- matching) by setting the `includePrerelease` flag on the options
161
- object to any
162
- [functions](https://github.com/npm/node-semver#functions) that do
163
- range matching.
164
-
165
- #### Prerelease Identifiers
166
-
167
- The method `.inc` takes an additional `identifier` string argument that
168
- will append the value of the string as a prerelease identifier:
169
-
170
- ```javascript
171
- semver.inc('1.2.3', 'prerelease', 'beta')
172
- // '1.2.4-beta.0'
173
- ```
174
-
175
- command-line example:
176
-
177
- ```bash
178
- $ semver 1.2.3 -i prerelease --preid beta
179
- 1.2.4-beta.0
180
- ```
181
-
182
- Which then can be used to increment further:
183
-
184
- ```bash
185
- $ semver 1.2.4-beta.0 -i prerelease
186
- 1.2.4-beta.1
187
- ```
188
-
189
- ### Advanced Range Syntax
190
-
191
- Advanced range syntax desugars to primitive comparators in
192
- deterministic ways.
193
-
194
- Advanced ranges may be combined in the same way as primitive
195
- comparators using white space or `||`.
196
-
197
- #### Hyphen Ranges `X.Y.Z - A.B.C`
198
-
199
- Specifies an inclusive set.
200
-
201
- * `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
202
-
203
- If a partial version is provided as the first version in the inclusive
204
- range, then the missing pieces are replaced with zeroes.
205
-
206
- * `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
207
-
208
- If a partial version is provided as the second version in the
209
- inclusive range, then all versions that start with the supplied parts
210
- of the tuple are accepted, but nothing that would be greater than the
211
- provided tuple parts.
212
-
213
- * `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
214
- * `1.2.3 - 2` := `>=1.2.3 <3.0.0`
215
-
216
- #### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
217
-
218
- Any of `X`, `x`, or `*` may be used to "stand in" for one of the
219
- numeric values in the `[major, minor, patch]` tuple.
220
-
221
- * `*` := `>=0.0.0` (Any version satisfies)
222
- * `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
223
- * `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
224
-
225
- A partial version range is treated as an X-Range, so the special
226
- character is in fact optional.
227
-
228
- * `""` (empty string) := `*` := `>=0.0.0`
229
- * `1` := `1.x.x` := `>=1.0.0 <2.0.0`
230
- * `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
231
-
232
- #### Tilde Ranges `~1.2.3` `~1.2` `~1`
233
-
234
- Allows patch-level changes if a minor version is specified on the
235
- comparator. Allows minor-level changes if not.
236
-
237
- * `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
238
- * `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
239
- * `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
240
- * `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
241
- * `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
242
- * `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
243
- * `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
244
- the `1.2.3` version will be allowed, if they are greater than or
245
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
246
- `1.2.4-beta.2` would not, because it is a prerelease of a
247
- different `[major, minor, patch]` tuple.
248
-
249
- #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
250
-
251
- Allows changes that do not modify the left-most non-zero element in the
252
- `[major, minor, patch]` tuple. In other words, this allows patch and
253
- minor updates for versions `1.0.0` and above, patch updates for
254
- versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
255
-
256
- Many authors treat a `0.x` version as if the `x` were the major
257
- "breaking-change" indicator.
258
-
259
- Caret ranges are ideal when an author may make breaking changes
260
- between `0.2.4` and `0.3.0` releases, which is a common practice.
261
- However, it presumes that there will *not* be breaking changes between
262
- `0.2.4` and `0.2.5`. It allows for changes that are presumed to be
263
- additive (but non-breaking), according to commonly observed practices.
264
-
265
- * `^1.2.3` := `>=1.2.3 <2.0.0`
266
- * `^0.2.3` := `>=0.2.3 <0.3.0`
267
- * `^0.0.3` := `>=0.0.3 <0.0.4`
268
- * `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
269
- the `1.2.3` version will be allowed, if they are greater than or
270
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
271
- `1.2.4-beta.2` would not, because it is a prerelease of a
272
- different `[major, minor, patch]` tuple.
273
- * `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
274
- `0.0.3` version *only* will be allowed, if they are greater than or
275
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
276
-
277
- When parsing caret ranges, a missing `patch` value desugars to the
278
- number `0`, but will allow flexibility within that value, even if the
279
- major and minor versions are both `0`.
280
-
281
- * `^1.2.x` := `>=1.2.0 <2.0.0`
282
- * `^0.0.x` := `>=0.0.0 <0.1.0`
283
- * `^0.0` := `>=0.0.0 <0.1.0`
284
-
285
- A missing `minor` and `patch` values will desugar to zero, but also
286
- allow flexibility within those values, even if the major version is
287
- zero.
288
-
289
- * `^1.x` := `>=1.0.0 <2.0.0`
290
- * `^0.x` := `>=0.0.0 <1.0.0`
291
-
292
- ### Range Grammar
293
-
294
- Putting all this together, here is a Backus-Naur grammar for ranges,
295
- for the benefit of parser authors:
296
-
297
- ```bnf
298
- range-set ::= range ( logical-or range ) *
299
- logical-or ::= ( ' ' ) * '||' ( ' ' ) *
300
- range ::= hyphen | simple ( ' ' simple ) * | ''
301
- hyphen ::= partial ' - ' partial
302
- simple ::= primitive | partial | tilde | caret
303
- primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
304
- partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
305
- xr ::= 'x' | 'X' | '*' | nr
306
- nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
307
- tilde ::= '~' partial
308
- caret ::= '^' partial
309
- qualifier ::= ( '-' pre )? ( '+' build )?
310
- pre ::= parts
311
- build ::= parts
312
- parts ::= part ( '.' part ) *
313
- part ::= nr | [-0-9A-Za-z]+
314
- ```
315
-
316
- ## Functions
317
-
318
- All methods and classes take a final `options` object argument. All
319
- options in this object are `false` by default. The options supported
320
- are:
321
-
322
- - `loose` Be more forgiving about not-quite-valid semver strings.
323
- (Any resulting output will always be 100% strict compliant, of
324
- course.) For backwards compatibility reasons, if the `options`
325
- argument is a boolean value instead of an object, it is interpreted
326
- to be the `loose` param.
327
- - `includePrerelease` Set to suppress the [default
328
- behavior](https://github.com/npm/node-semver#prerelease-tags) of
329
- excluding prerelease tagged versions from ranges unless they are
330
- explicitly opted into.
331
-
332
- Strict-mode Comparators and Ranges will be strict about the SemVer
333
- strings that they parse.
334
-
335
- * `valid(v)`: Return the parsed version, or null if it's not valid.
336
- * `inc(v, release)`: Return the version incremented by the release
337
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
338
- `prepatch`, or `prerelease`), or null if it's not valid
339
- * `premajor` in one call will bump the version up to the next major
340
- version and down to a prerelease of that major version.
341
- `preminor`, and `prepatch` work the same way.
342
- * If called from a non-prerelease version, the `prerelease` will work the
343
- same as `prepatch`. It increments the patch version, then makes a
344
- prerelease. If the input version is already a prerelease it simply
345
- increments it.
346
- * `prerelease(v)`: Returns an array of prerelease components, or null
347
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
348
- * `major(v)`: Return the major version number.
349
- * `minor(v)`: Return the minor version number.
350
- * `patch(v)`: Return the patch version number.
351
- * `intersects(r1, r2, loose)`: Return true if the two supplied ranges
352
- or comparators intersect.
353
- * `parse(v)`: Attempt to parse a string as a semantic version, returning either
354
- a `SemVer` object or `null`.
355
-
356
- ### Comparison
357
-
358
- * `gt(v1, v2)`: `v1 > v2`
359
- * `gte(v1, v2)`: `v1 >= v2`
360
- * `lt(v1, v2)`: `v1 < v2`
361
- * `lte(v1, v2)`: `v1 <= v2`
362
- * `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
363
- even if they're not the exact same string. You already know how to
364
- compare strings.
365
- * `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
366
- * `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
367
- the corresponding function above. `"==="` and `"!=="` do simple
368
- string comparison, but are included for completeness. Throws if an
369
- invalid comparison string is provided.
370
- * `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
371
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
372
- * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
373
- in descending order when passed to `Array.sort()`.
374
- * `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
375
- are equal. Sorts in ascending order if passed to `Array.sort()`.
376
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
377
- * `diff(v1, v2)`: Returns difference between two versions by the release type
378
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
379
- or null if the versions are the same.
380
-
381
- ### Comparators
382
-
383
- * `intersects(comparator)`: Return true if the comparators intersect
384
-
385
- ### Ranges
386
-
387
- * `validRange(range)`: Return the valid range or null if it's not valid
388
- * `satisfies(version, range)`: Return true if the version satisfies the
389
- range.
390
- * `maxSatisfying(versions, range)`: Return the highest version in the list
391
- that satisfies the range, or `null` if none of them do.
392
- * `minSatisfying(versions, range)`: Return the lowest version in the list
393
- that satisfies the range, or `null` if none of them do.
394
- * `minVersion(range)`: Return the lowest version that can possibly match
395
- the given range.
396
- * `gtr(version, range)`: Return `true` if version is greater than all the
397
- versions possible in the range.
398
- * `ltr(version, range)`: Return `true` if version is less than all the
399
- versions possible in the range.
400
- * `outside(version, range, hilo)`: Return true if the version is outside
401
- the bounds of the range in either the high or low direction. The
402
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
403
- the function called by `gtr` and `ltr`.)
404
- * `intersects(range)`: Return true if any of the ranges comparators intersect
405
-
406
- Note that, since ranges may be non-contiguous, a version might not be
407
- greater than a range, less than a range, *or* satisfy a range! For
408
- example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
409
- until `2.0.0`, so the version `1.2.10` would not be greater than the
410
- range (because `2.0.1` satisfies, which is higher), nor less than the
411
- range (since `1.2.8` satisfies, which is lower), and it also does not
412
- satisfy the range.
413
-
414
- If you want to know if a version satisfies or does not satisfy a
415
- range, use the `satisfies(version, range)` function.
416
-
417
- ### Coercion
418
-
419
- * `coerce(version, options)`: Coerces a string to semver if possible
420
-
421
- This aims to provide a very forgiving translation of a non-semver string to
422
- semver. It looks for the first digit in a string, and consumes all
423
- remaining characters which satisfy at least a partial semver (e.g., `1`,
424
- `1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
425
- versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
426
- surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
427
- `3.4.0`). Only text which lacks digits will fail coercion (`version one`
428
- is not valid). The maximum length for any semver component considered for
429
- coercion is 16 characters; longer components will be ignored
430
- (`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
431
- semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
432
- components are invalid (`9999999999999999.4.7.4` is likely invalid).
433
-
434
- If the `options.rtl` flag is set, then `coerce` will return the right-most
435
- coercible tuple that does not share an ending index with a longer coercible
436
- tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
437
- `4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
438
- any other overlapping SemVer tuple.
439
-
440
- ### Clean
441
-
442
- * `clean(version)`: Clean a string to be a valid semver if possible
443
-
444
- This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
445
-
446
- ex.
447
- * `s.clean(' = v 2.1.5foo')`: `null`
448
- * `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
449
- * `s.clean(' = v 2.1.5-foo')`: `null`
450
- * `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
451
- * `s.clean('=v2.1.5')`: `'2.1.5'`
452
- * `s.clean(' =v2.1.5')`: `2.1.5`
453
- * `s.clean(' 2.1.5 ')`: `'2.1.5'`
454
- * `s.clean('~1.0.0')`: `null`
@@ -1,28 +0,0 @@
1
- {
2
- "name": "@nicolo-ribaudo/semver-v6",
3
- "version": "6.3.3",
4
- "description": "v6 of the \"semver\" package, with security fixes backported from v7.",
5
- "main": "semver.js",
6
- "scripts": {
7
- "test": "tap",
8
- "preversion": "npm test",
9
- "postversion": "npm publish",
10
- "postpublish": "git push origin --follow-tags"
11
- },
12
- "devDependencies": {
13
- "tap": "^14.3.1"
14
- },
15
- "license": "ISC",
16
- "repository": "https://github.com/nicolo-ribaudo/semver-v6",
17
- "bin": {
18
- "semver": "./bin/semver.js"
19
- },
20
- "files": [
21
- "bin",
22
- "range.bnf",
23
- "semver.js"
24
- ],
25
- "tap": {
26
- "check-coverage": true
27
- }
28
- }
@@ -1,16 +0,0 @@
1
- range-set ::= range ( logical-or range ) *
2
- logical-or ::= ( ' ' ) * '||' ( ' ' ) *
3
- range ::= hyphen | simple ( ' ' simple ) * | ''
4
- hyphen ::= partial ' - ' partial
5
- simple ::= primitive | partial | tilde | caret
6
- primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
7
- partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
8
- xr ::= 'x' | 'X' | '*' | nr
9
- nr ::= '0' | [1-9] ( [0-9] ) *
10
- tilde ::= '~' partial
11
- caret ::= '^' partial
12
- qualifier ::= ( '-' pre )? ( '+' build )?
13
- pre ::= parts
14
- build ::= parts
15
- parts ::= part ( '.' part ) *
16
- part ::= nr | [-0-9A-Za-z]+
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Iced Development
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,77 +0,0 @@
1
- pg-connection-string
2
- ====================
3
-
4
- [![NPM](https://nodei.co/npm/pg-connection-string.png?compact=true)](https://nodei.co/npm/pg-connection-string/)
5
-
6
- [![Build Status](https://travis-ci.org/iceddev/pg-connection-string.svg?branch=master)](https://travis-ci.org/iceddev/pg-connection-string)
7
- [![Coverage Status](https://coveralls.io/repos/github/iceddev/pg-connection-string/badge.svg?branch=master)](https://coveralls.io/github/iceddev/pg-connection-string?branch=master)
8
-
9
- Functions for dealing with a PostgresSQL connection string
10
-
11
- `parse` method taken from [node-postgres](https://github.com/brianc/node-postgres.git)
12
- Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com)
13
- MIT License
14
-
15
- ## Usage
16
-
17
- ```js
18
- var parse = require('pg-connection-string').parse;
19
-
20
- var config = parse('postgres://someuser:somepassword@somehost:381/somedatabase')
21
- ```
22
-
23
- The resulting config contains a subset of the following properties:
24
-
25
- * `host` - Postgres server hostname or, for UNIX domain sockets, the socket filename
26
- * `port` - port on which to connect
27
- * `user` - User with which to authenticate to the server
28
- * `password` - Corresponding password
29
- * `database` - Database name within the server
30
- * `client_encoding` - string encoding the client will use
31
- * `ssl`, either a boolean or an object with properties
32
- * `rejectUnauthorized`
33
- * `cert`
34
- * `key`
35
- * `ca`
36
- * any other query parameters (for example, `application_name`) are preserved intact.
37
-
38
- ## Connection Strings
39
-
40
- The short summary of acceptable URLs is:
41
-
42
- * `socket:<path>?<query>` - UNIX domain socket
43
- * `postgres://<user>:<password>@<host>:<port>/<database>?<query>` - TCP connection
44
-
45
- But see below for more details.
46
-
47
- ### UNIX Domain Sockets
48
-
49
- When user and password are not given, the socket path follows `socket:`, as in `socket:/var/run/pgsql`.
50
- This form can be shortened to just a path: `/var/run/pgsql`.
51
-
52
- When user and password are given, they are included in the typical URL positions, with an empty `host`, as in `socket://user:pass@/var/run/pgsql`.
53
-
54
- Query parameters follow a `?` character, including the following special query parameters:
55
-
56
- * `db=<database>` - sets the database name (urlencoded)
57
- * `encoding=<encoding>` - sets the `client_encoding` property
58
-
59
- ### TCP Connections
60
-
61
- TCP connections to the Postgres server are indicated with `pg:` or `postgres:` schemes (in fact, any scheme but `socket:` is accepted).
62
- If username and password are included, they should be urlencoded.
63
- The database name, however, should *not* be urlencoded.
64
-
65
- Query parameters follow a `?` character, including the following special query parameters:
66
- * `host=<host>` - sets `host` property, overriding the URL's host
67
- * `encoding=<encoding>` - sets the `client_encoding` property
68
- * `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly
69
- * `sslmode=<sslmode>`
70
- * `sslmode=disable` - sets `ssl` to false
71
- * `sslmode=no-verify` - sets `ssl` to `{ rejectUnauthorized: false }`
72
- * `sslmode=prefer`, `sslmode=require`, `sslmode=verify-ca`, `sslmode=verify-full` - sets `ssl` to true
73
- * `sslcert=<filename>` - reads data from the given file and includes the result as `ssl.cert`
74
- * `sslkey=<filename>` - reads data from the given file and includes the result as `ssl.key`
75
- * `sslrootcert=<filename>` - reads data from the given file and includes the result as `ssl.ca`
76
-
77
- A bare relative URL, such as `salesdata`, will indicate a database name while leaving other properties empty.