@aws-cdk/cloud-assembly-schema 2.20.0 → 2.22.0

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 (37) hide show
  1. package/.jsii +57 -31
  2. package/.jsii.tabl.json +68 -3
  3. package/.warnings.jsii.js +253 -147
  4. package/NOTICE +0 -17
  5. package/lib/integ-tests/test-case.d.ts +47 -42
  6. package/lib/integ-tests/test-case.js +1 -1
  7. package/lib/manifest.js +57 -8
  8. package/node_modules/lru-cache/LICENSE +1 -1
  9. package/node_modules/lru-cache/README.md +632 -99
  10. package/node_modules/lru-cache/index.js +732 -251
  11. package/node_modules/lru-cache/package.json +17 -7
  12. package/node_modules/semver/README.md +3 -1
  13. package/node_modules/semver/bin/semver.js +17 -8
  14. package/node_modules/semver/classes/comparator.js +3 -2
  15. package/node_modules/semver/classes/index.js +1 -1
  16. package/node_modules/semver/classes/range.js +31 -22
  17. package/node_modules/semver/functions/cmp.js +8 -4
  18. package/node_modules/semver/functions/coerce.js +3 -2
  19. package/node_modules/semver/functions/parse.js +1 -1
  20. package/node_modules/semver/internal/constants.js +2 -2
  21. package/node_modules/semver/internal/identifiers.js +1 -1
  22. package/node_modules/semver/internal/parse-options.js +3 -3
  23. package/node_modules/semver/internal/re.js +3 -3
  24. package/node_modules/semver/package.json +46 -13
  25. package/node_modules/semver/ranges/min-version.js +2 -1
  26. package/node_modules/semver/ranges/outside.js +1 -1
  27. package/node_modules/semver/ranges/simplify.js +15 -12
  28. package/node_modules/semver/ranges/subset.js +53 -31
  29. package/package.json +6 -5
  30. package/schema/cloud-assembly.version.json +1 -1
  31. package/schema/integ.schema.json +1 -1
  32. package/node_modules/semver/CHANGELOG.md +0 -111
  33. package/node_modules/yallist/LICENSE +0 -15
  34. package/node_modules/yallist/README.md +0 -204
  35. package/node_modules/yallist/iterator.js +0 -8
  36. package/node_modules/yallist/package.json +0 -29
  37. package/node_modules/yallist/yallist.js +0 -426
@@ -41,8 +41,9 @@ const compare = require('../functions/compare.js')
41
41
  // - Else return true
42
42
 
43
43
  const subset = (sub, dom, options = {}) => {
44
- if (sub === dom)
44
+ if (sub === dom) {
45
45
  return true
46
+ }
46
47
 
47
48
  sub = new Range(sub, options)
48
49
  dom = new Range(dom, options)
@@ -52,73 +53,84 @@ const subset = (sub, dom, options = {}) => {
52
53
  for (const simpleDom of dom.set) {
53
54
  const isSub = simpleSubset(simpleSub, simpleDom, options)
54
55
  sawNonNull = sawNonNull || isSub !== null
55
- if (isSub)
56
+ if (isSub) {
56
57
  continue OUTER
58
+ }
57
59
  }
58
60
  // the null set is a subset of everything, but null simple ranges in
59
61
  // a complex range should be ignored. so if we saw a non-null range,
60
62
  // then we know this isn't a subset, but if EVERY simple range was null,
61
63
  // then it is a subset.
62
- if (sawNonNull)
64
+ if (sawNonNull) {
63
65
  return false
66
+ }
64
67
  }
65
68
  return true
66
69
  }
67
70
 
68
71
  const simpleSubset = (sub, dom, options) => {
69
- if (sub === dom)
72
+ if (sub === dom) {
70
73
  return true
74
+ }
71
75
 
72
76
  if (sub.length === 1 && sub[0].semver === ANY) {
73
- if (dom.length === 1 && dom[0].semver === ANY)
77
+ if (dom.length === 1 && dom[0].semver === ANY) {
74
78
  return true
75
- else if (options.includePrerelease)
76
- sub = [ new Comparator('>=0.0.0-0') ]
77
- else
78
- sub = [ new Comparator('>=0.0.0') ]
79
+ } else if (options.includePrerelease) {
80
+ sub = [new Comparator('>=0.0.0-0')]
81
+ } else {
82
+ sub = [new Comparator('>=0.0.0')]
83
+ }
79
84
  }
80
85
 
81
86
  if (dom.length === 1 && dom[0].semver === ANY) {
82
- if (options.includePrerelease)
87
+ if (options.includePrerelease) {
83
88
  return true
84
- else
85
- dom = [ new Comparator('>=0.0.0') ]
89
+ } else {
90
+ dom = [new Comparator('>=0.0.0')]
91
+ }
86
92
  }
87
93
 
88
94
  const eqSet = new Set()
89
95
  let gt, lt
90
96
  for (const c of sub) {
91
- if (c.operator === '>' || c.operator === '>=')
97
+ if (c.operator === '>' || c.operator === '>=') {
92
98
  gt = higherGT(gt, c, options)
93
- else if (c.operator === '<' || c.operator === '<=')
99
+ } else if (c.operator === '<' || c.operator === '<=') {
94
100
  lt = lowerLT(lt, c, options)
95
- else
101
+ } else {
96
102
  eqSet.add(c.semver)
103
+ }
97
104
  }
98
105
 
99
- if (eqSet.size > 1)
106
+ if (eqSet.size > 1) {
100
107
  return null
108
+ }
101
109
 
102
110
  let gtltComp
103
111
  if (gt && lt) {
104
112
  gtltComp = compare(gt.semver, lt.semver, options)
105
- if (gtltComp > 0)
113
+ if (gtltComp > 0) {
106
114
  return null
107
- else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<='))
115
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
108
116
  return null
117
+ }
109
118
  }
110
119
 
111
120
  // will iterate one or zero times
112
121
  for (const eq of eqSet) {
113
- if (gt && !satisfies(eq, String(gt), options))
122
+ if (gt && !satisfies(eq, String(gt), options)) {
114
123
  return null
124
+ }
115
125
 
116
- if (lt && !satisfies(eq, String(lt), options))
126
+ if (lt && !satisfies(eq, String(lt), options)) {
117
127
  return null
128
+ }
118
129
 
119
130
  for (const c of dom) {
120
- if (!satisfies(eq, String(c), options))
131
+ if (!satisfies(eq, String(c), options)) {
121
132
  return false
133
+ }
122
134
  }
123
135
 
124
136
  return true
@@ -154,10 +166,12 @@ const simpleSubset = (sub, dom, options) => {
154
166
  }
155
167
  if (c.operator === '>' || c.operator === '>=') {
156
168
  higher = higherGT(gt, c, options)
157
- if (higher === c && higher !== gt)
169
+ if (higher === c && higher !== gt) {
158
170
  return false
159
- } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options))
171
+ }
172
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
160
173
  return false
174
+ }
161
175
  }
162
176
  if (lt) {
163
177
  if (needDomLTPre) {
@@ -170,37 +184,44 @@ const simpleSubset = (sub, dom, options) => {
170
184
  }
171
185
  if (c.operator === '<' || c.operator === '<=') {
172
186
  lower = lowerLT(lt, c, options)
173
- if (lower === c && lower !== lt)
187
+ if (lower === c && lower !== lt) {
174
188
  return false
175
- } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options))
189
+ }
190
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
176
191
  return false
192
+ }
177
193
  }
178
- if (!c.operator && (lt || gt) && gtltComp !== 0)
194
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
179
195
  return false
196
+ }
180
197
  }
181
198
 
182
199
  // if there was a < or >, and nothing in the dom, then must be false
183
200
  // UNLESS it was limited by another range in the other direction.
184
201
  // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
185
- if (gt && hasDomLT && !lt && gtltComp !== 0)
202
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
186
203
  return false
204
+ }
187
205
 
188
- if (lt && hasDomGT && !gt && gtltComp !== 0)
206
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
189
207
  return false
208
+ }
190
209
 
191
210
  // we needed a prerelease range in a specific tuple, but didn't get one
192
211
  // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
193
212
  // because it includes prereleases in the 1.2.3 tuple
194
- if (needDomGTPre || needDomLTPre)
213
+ if (needDomGTPre || needDomLTPre) {
195
214
  return false
215
+ }
196
216
 
197
217
  return true
198
218
  }
199
219
 
200
220
  // >=1.2.3 is lower than >1.2.3
201
221
  const higherGT = (a, b, options) => {
202
- if (!a)
222
+ if (!a) {
203
223
  return b
224
+ }
204
225
  const comp = compare(a.semver, b.semver, options)
205
226
  return comp > 0 ? a
206
227
  : comp < 0 ? b
@@ -210,8 +231,9 @@ const higherGT = (a, b, options) => {
210
231
 
211
232
  // <=1.2.3 is higher than <1.2.3
212
233
  const lowerLT = (a, b, options) => {
213
- if (!a)
234
+ if (!a) {
214
235
  return b
236
+ }
215
237
  const comp = compare(a.semver, b.semver, options)
216
238
  return comp < 0 ? a
217
239
  : comp > 0 ? b
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-cdk/cloud-assembly-schema",
3
- "version": "2.20.0",
3
+ "version": "2.22.0",
4
4
  "description": "Cloud Assembly Schema",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -23,7 +23,8 @@
23
23
  "distName": "aws-cdk.cloud-assembly-schema",
24
24
  "module": "aws_cdk.cloud_assembly_schema",
25
25
  "classifiers": [
26
- "Framework :: AWS CDK"
26
+ "Framework :: AWS CDK",
27
+ "Framework :: AWS CDK :: 2"
27
28
  ]
28
29
  }
29
30
  },
@@ -59,8 +60,8 @@
59
60
  },
60
61
  "license": "Apache-2.0",
61
62
  "devDependencies": {
62
- "@aws-cdk/cdk-build-tools": "2.20.0",
63
- "@aws-cdk/pkglint": "2.20.0",
63
+ "@aws-cdk/cdk-build-tools": "2.22.0",
64
+ "@aws-cdk/pkglint": "2.22.0",
64
65
  "@types/jest": "^27.4.1",
65
66
  "@types/mock-fs": "^4.13.1",
66
67
  "@types/semver": "^7.3.9",
@@ -91,7 +92,7 @@
91
92
  },
92
93
  "dependencies": {
93
94
  "jsonschema": "^1.4.0",
94
- "semver": "^7.3.5"
95
+ "semver": "^7.3.6"
95
96
  },
96
97
  "awscdkio": {
97
98
  "announce": false
@@ -1 +1 @@
1
- {"version":"17.0.0"}
1
+ {"version":"17.0.0"}
@@ -471,4 +471,4 @@
471
471
  }
472
472
  },
473
473
  "$schema": "http://json-schema.org/draft-07/schema#"
474
- }
474
+ }
@@ -1,111 +0,0 @@
1
- # changes log
2
-
3
- ## 7.3.0
4
-
5
- * Add `subset(r1, r2)` method to determine if `r1` range is entirely
6
- contained by `r2` range.
7
-
8
- ## 7.2.3
9
-
10
- * Fix handling of `includePrelease` mode where version ranges like `1.0.0 -
11
- 2.0.0` would include `3.0.0-pre` and not `1.0.0-pre`.
12
-
13
- ## 7.2.2
14
-
15
- * Fix bug where `2.0.0-pre` would be included in `^1.0.0` if
16
- `includePrerelease` was set to true.
17
-
18
- ## 7.2.0
19
-
20
- * Add `simplifyRange` method to attempt to generate a more human-readable
21
- range expression that is equivalent to a supplied range, for a given set
22
- of versions.
23
-
24
- ## 7.1.2
25
-
26
- * Remove fancy lazy-loading logic, as it was causing problems for webpack
27
- users.
28
-
29
- ## 7.1.0
30
-
31
- * Add `require('semver/preload')` to load the entire module without using
32
- lazy getter methods.
33
-
34
- ## 7.0.0
35
-
36
- * Refactor module into separate files for better tree-shaking
37
- * Drop support for very old node versions, use const/let, `=>` functions,
38
- and classes.
39
-
40
- ## 6.3.0
41
-
42
- * Expose the token enum on the exports
43
-
44
- ## 6.2.0
45
-
46
- * Coerce numbers to strings when passed to semver.coerce()
47
- * Add `rtl` option to coerce from right to left
48
-
49
- ## 6.1.3
50
-
51
- * Handle X-ranges properly in includePrerelease mode
52
-
53
- ## 6.1.2
54
-
55
- * Do not throw when testing invalid version strings
56
-
57
- ## 6.1.1
58
-
59
- * Add options support for semver.coerce()
60
- * Handle undefined version passed to Range.test
61
-
62
- ## 6.1.0
63
-
64
- * Add semver.compareBuild function
65
- * Support `*` in semver.intersects
66
-
67
- ## 6.0
68
-
69
- * Fix `intersects` logic.
70
-
71
- This is technically a bug fix, but since it is also a change to behavior
72
- that may require users updating their code, it is marked as a major
73
- version increment.
74
-
75
- ## 5.7
76
-
77
- * Add `minVersion` method
78
-
79
- ## 5.6
80
-
81
- * Move boolean `loose` param to an options object, with
82
- backwards-compatibility protection.
83
- * Add ability to opt out of special prerelease version handling with
84
- the `includePrerelease` option flag.
85
-
86
- ## 5.5
87
-
88
- * Add version coercion capabilities
89
-
90
- ## 5.4
91
-
92
- * Add intersection checking
93
-
94
- ## 5.3
95
-
96
- * Add `minSatisfying` method
97
-
98
- ## 5.2
99
-
100
- * Add `prerelease(v)` that returns prerelease components
101
-
102
- ## 5.1
103
-
104
- * Add Backus-Naur for ranges
105
- * Remove excessively cute inspection methods
106
-
107
- ## 5.0
108
-
109
- * Remove AMD/Browserified build artifacts
110
- * Fix ltr and gtr when using the `*` range
111
- * 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,204 +0,0 @@
1
- # yallist
2
-
3
- Yet Another Linked List
4
-
5
- There are many doubly-linked list implementations like it, but this
6
- one is mine.
7
-
8
- For when an array would be too big, and a Map can't be iterated in
9
- reverse order.
10
-
11
-
12
- [![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
13
-
14
- ## basic usage
15
-
16
- ```javascript
17
- var yallist = require('yallist')
18
- var myList = yallist.create([1, 2, 3])
19
- myList.push('foo')
20
- myList.unshift('bar')
21
- // of course pop() and shift() are there, too
22
- console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
23
- myList.forEach(function (k) {
24
- // walk the list head to tail
25
- })
26
- myList.forEachReverse(function (k, index, list) {
27
- // walk the list tail to head
28
- })
29
- var myDoubledList = myList.map(function (k) {
30
- return k + k
31
- })
32
- // now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
33
- // mapReverse is also a thing
34
- var myDoubledListReverse = myList.mapReverse(function (k) {
35
- return k + k
36
- }) // ['foofoo', 6, 4, 2, 'barbar']
37
-
38
- var reduced = myList.reduce(function (set, entry) {
39
- set += entry
40
- return set
41
- }, 'start')
42
- console.log(reduced) // 'startfoo123bar'
43
- ```
44
-
45
- ## api
46
-
47
- The whole API is considered "public".
48
-
49
- Functions with the same name as an Array method work more or less the
50
- same way.
51
-
52
- There's reverse versions of most things because that's the point.
53
-
54
- ### Yallist
55
-
56
- Default export, the class that holds and manages a list.
57
-
58
- Call it with either a forEach-able (like an array) or a set of
59
- arguments, to initialize the list.
60
-
61
- The Array-ish methods all act like you'd expect. No magic length,
62
- though, so if you change that it won't automatically prune or add
63
- empty spots.
64
-
65
- ### Yallist.create(..)
66
-
67
- Alias for Yallist function. Some people like factories.
68
-
69
- #### yallist.head
70
-
71
- The first node in the list
72
-
73
- #### yallist.tail
74
-
75
- The last node in the list
76
-
77
- #### yallist.length
78
-
79
- The number of nodes in the list. (Change this at your peril. It is
80
- not magic like Array length.)
81
-
82
- #### yallist.toArray()
83
-
84
- Convert the list to an array.
85
-
86
- #### yallist.forEach(fn, [thisp])
87
-
88
- Call a function on each item in the list.
89
-
90
- #### yallist.forEachReverse(fn, [thisp])
91
-
92
- Call a function on each item in the list, in reverse order.
93
-
94
- #### yallist.get(n)
95
-
96
- Get the data at position `n` in the list. If you use this a lot,
97
- probably better off just using an Array.
98
-
99
- #### yallist.getReverse(n)
100
-
101
- Get the data at position `n`, counting from the tail.
102
-
103
- #### yallist.map(fn, thisp)
104
-
105
- Create a new Yallist with the result of calling the function on each
106
- item.
107
-
108
- #### yallist.mapReverse(fn, thisp)
109
-
110
- Same as `map`, but in reverse.
111
-
112
- #### yallist.pop()
113
-
114
- Get the data from the list tail, and remove the tail from the list.
115
-
116
- #### yallist.push(item, ...)
117
-
118
- Insert one or more items to the tail of the list.
119
-
120
- #### yallist.reduce(fn, initialValue)
121
-
122
- Like Array.reduce.
123
-
124
- #### yallist.reduceReverse
125
-
126
- Like Array.reduce, but in reverse.
127
-
128
- #### yallist.reverse
129
-
130
- Reverse the list in place.
131
-
132
- #### yallist.shift()
133
-
134
- Get the data from the list head, and remove the head from the list.
135
-
136
- #### yallist.slice([from], [to])
137
-
138
- Just like Array.slice, but returns a new Yallist.
139
-
140
- #### yallist.sliceReverse([from], [to])
141
-
142
- Just like yallist.slice, but the result is returned in reverse.
143
-
144
- #### yallist.toArray()
145
-
146
- Create an array representation of the list.
147
-
148
- #### yallist.toArrayReverse()
149
-
150
- Create a reversed array representation of the list.
151
-
152
- #### yallist.unshift(item, ...)
153
-
154
- Insert one or more items to the head of the list.
155
-
156
- #### yallist.unshiftNode(node)
157
-
158
- Move a Node object to the front of the list. (That is, pull it out of
159
- wherever it lives, and make it the new head.)
160
-
161
- If the node belongs to a different list, then that list will remove it
162
- first.
163
-
164
- #### yallist.pushNode(node)
165
-
166
- Move a Node object to the end of the list. (That is, pull it out of
167
- wherever it lives, and make it the new tail.)
168
-
169
- If the node belongs to a list already, then that list will remove it
170
- first.
171
-
172
- #### yallist.removeNode(node)
173
-
174
- Remove a node from the list, preserving referential integrity of head
175
- and tail and other nodes.
176
-
177
- Will throw an error if you try to have a list remove a node that
178
- doesn't belong to it.
179
-
180
- ### Yallist.Node
181
-
182
- The class that holds the data and is actually the list.
183
-
184
- Call with `var n = new Node(value, previousNode, nextNode)`
185
-
186
- Note that if you do direct operations on Nodes themselves, it's very
187
- easy to get into weird states where the list is broken. Be careful :)
188
-
189
- #### node.next
190
-
191
- The next node in the list.
192
-
193
- #### node.prev
194
-
195
- The previous node in the list.
196
-
197
- #### node.value
198
-
199
- The data the node contains.
200
-
201
- #### node.list
202
-
203
- The list to which this node belongs. (Null if it does not belong to
204
- any list.)
@@ -1,8 +0,0 @@
1
- 'use strict'
2
- module.exports = function (Yallist) {
3
- Yallist.prototype[Symbol.iterator] = function* () {
4
- for (let walker = this.head; walker; walker = walker.next) {
5
- yield walker.value
6
- }
7
- }
8
- }
@@ -1,29 +0,0 @@
1
- {
2
- "name": "yallist",
3
- "version": "4.0.0",
4
- "description": "Yet Another Linked List",
5
- "main": "yallist.js",
6
- "directories": {
7
- "test": "test"
8
- },
9
- "files": [
10
- "yallist.js",
11
- "iterator.js"
12
- ],
13
- "dependencies": {},
14
- "devDependencies": {
15
- "tap": "^12.1.0"
16
- },
17
- "scripts": {
18
- "test": "tap test/*.js --100",
19
- "preversion": "npm test",
20
- "postversion": "npm publish",
21
- "postpublish": "git push origin --all; git push origin --tags"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://github.com/isaacs/yallist.git"
26
- },
27
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
28
- "license": "ISC"
29
- }