You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

359 lines
16 KiB

4 years ago
  1. const typedArrayMethods = [
  2. "typed arrays / %TypedArray%.from",
  3. "typed arrays / %TypedArray%.of",
  4. "typed arrays / %TypedArray%.prototype.subarray",
  5. "typed arrays / %TypedArray%.prototype.join",
  6. "typed arrays / %TypedArray%.prototype.indexOf",
  7. "typed arrays / %TypedArray%.prototype.lastIndexOf",
  8. "typed arrays / %TypedArray%.prototype.slice",
  9. "typed arrays / %TypedArray%.prototype.every",
  10. "typed arrays / %TypedArray%.prototype.filter",
  11. "typed arrays / %TypedArray%.prototype.forEach",
  12. "typed arrays / %TypedArray%.prototype.map",
  13. "typed arrays / %TypedArray%.prototype.reduce",
  14. "typed arrays / %TypedArray%.prototype.reduceRight",
  15. "typed arrays / %TypedArray%.prototype.reverse",
  16. "typed arrays / %TypedArray%.prototype.some",
  17. "typed arrays / %TypedArray%.prototype.sort",
  18. "typed arrays / %TypedArray%.prototype.copyWithin",
  19. "typed arrays / %TypedArray%.prototype.find",
  20. "typed arrays / %TypedArray%.prototype.findIndex",
  21. "typed arrays / %TypedArray%.prototype.fill",
  22. "typed arrays / %TypedArray%.prototype.keys",
  23. "typed arrays / %TypedArray%.prototype.values",
  24. "typed arrays / %TypedArray%.prototype.entries",
  25. "typed arrays / %TypedArray%.prototype[Symbol.iterator]",
  26. "typed arrays / %TypedArray%[Symbol.species]",
  27. ];
  28. const es = {
  29. // compat-table missing babel6 mapping
  30. // "es6.array.concat": {
  31. // features: [
  32. // "well-known symbols / Symbol.isConcatSpreadable",
  33. // "well-known symbols / Symbol.species, Array.prototype.concat",
  34. // ]
  35. // },
  36. "es6.array.copy-within": "Array.prototype methods / Array.prototype.copyWithin",
  37. "es6.array.every": "Array methods / Array.prototype.every",
  38. "es6.array.fill": "Array.prototype methods / Array.prototype.fill",
  39. "es6.array.filter": {
  40. features: [
  41. "Array methods / Array.prototype.filter",
  42. // compat-table missing babel6 mapping
  43. // "well-known symbols / Symbol.species, Array.prototype.filter",
  44. ],
  45. },
  46. "es6.array.find": "Array.prototype methods / Array.prototype.find",
  47. "es6.array.find-index": "Array.prototype methods / Array.prototype.findIndex",
  48. "es7.array.flat-map": "Array.prototype.{flat, flatMap} / Array.prototype.flatMap",
  49. "es6.array.for-each": "Array methods / Array.prototype.forEach",
  50. "es6.array.from": "Array static methods / Array.from",
  51. "es7.array.includes": "Array.prototype.includes",
  52. "es6.array.index-of": "Array methods / Array.prototype.indexOf",
  53. "es6.array.is-array": "Array methods / Array.isArray",
  54. // "es.array.join": "", required tests for that
  55. "es6.array.iterator": {
  56. features: [
  57. "Array.prototype methods / Array.prototype.keys",
  58. // can use Symbol.iterator, not implemented in many environments
  59. // "Array.prototype methods / Array.prototype.values",
  60. "Array.prototype methods / Array.prototype.entries",
  61. ],
  62. },
  63. "es6.array.last-index-of": "Array methods / Array.prototype.lastIndexOf",
  64. "es6.array.map": {
  65. features: [
  66. "Array methods / Array.prototype.map",
  67. // compat-table missing babel6 mapping
  68. // "well-known symbols / Symbol.species, Array.prototype.map",
  69. ],
  70. },
  71. "es6.array.of": "Array static methods / Array.of",
  72. "es6.array.reduce": "Array methods / Array.prototype.reduce",
  73. "es6.array.reduce-right": "Array methods / Array.prototype.reduceRight",
  74. // compat-table missing babel6 mapping
  75. // "es6.array.slice": "well-known symbols / Symbol.species, Array.prototype.slice",
  76. "es6.array.some": "Array methods / Array.prototype.some",
  77. "es6.array.sort": "Array methods / Array.prototype.sort",
  78. "es6.array.species": "Array static methods / Array[Symbol.species]",
  79. // compat-table missing babel6 mapping
  80. //"es6.array.splice": "well-known symbols / Symbol.species, Array.prototype.splice",
  81. "es6.date.now": "Date methods / Date.now",
  82. "es6.date.to-iso-string": "Date methods / Date.prototype.toISOString",
  83. "es6.date.to-json": "Date methods / Date.prototype.toJSON",
  84. "es6.date.to-primitive": "Date.prototype[Symbol.toPrimitive]",
  85. "es6.date.to-string": "miscellaneous / Invalid Date",
  86. "es6.function.bind": "Function.prototype.bind",
  87. "es6.function.has-instance": "well-known symbols / Symbol.hasInstance",
  88. "es6.function.name": {
  89. features: [
  90. "function \"name\" property / function statements",
  91. "function \"name\" property / function expressions",
  92. ],
  93. },
  94. // This is explicit to prevent Map-related proposals (like
  95. // Map.prototype.upsert) from being included
  96. "es6.map": {
  97. features: [
  98. "Map / basic functionality",
  99. "Map / constructor arguments",
  100. "Map / constructor requires new",
  101. "Map / constructor accepts null",
  102. "Map / constructor invokes set",
  103. "Map / iterator closing",
  104. "Map / Map.prototype.add returns this",
  105. "Map / -0 key converts to +0",
  106. "Map / Map.prototype.size",
  107. "Map / Map.prototype.delete",
  108. "Map / Map.prototype.clear",
  109. "Map / Map.prototype.forEach",
  110. "Map / Map.prototype.keys",
  111. "Map / Map.prototype.values",
  112. "Map / Map.prototype.entries",
  113. "Map / Map.prototype[Symbol.iterator]",
  114. "Map / Map.prototype isn't an instance",
  115. "Map / Map iterator prototype chain",
  116. "Map / Map[Symbol.species]",
  117. ],
  118. },
  119. "es6.math.acosh": "Math methods / Math.acosh",
  120. "es6.math.asinh": "Math methods / Math.asinh",
  121. "es6.math.atanh": "Math methods / Math.atanh",
  122. "es6.math.cbrt": "Math methods / Math.cbrt",
  123. "es6.math.clz32": "Math methods / Math.clz32",
  124. "es6.math.cosh": "Math methods / Math.cosh",
  125. "es6.math.expm1": "Math methods / Math.expm1",
  126. "es6.math.fround": "Math methods / Math.fround",
  127. "es6.math.hypot": "Math methods / Math.hypot",
  128. "es6.math.imul": "Math methods / Math.imul",
  129. "es6.math.log1p": "Math methods / Math.log1p",
  130. "es6.math.log10": "Math methods / Math.log10",
  131. "es6.math.log2": "Math methods / Math.log2",
  132. "es6.math.sign": "Math methods / Math.sign",
  133. "es6.math.sinh": "Math methods / Math.sinh",
  134. "es6.math.tanh": "Math methods / Math.tanh",
  135. "es6.math.trunc": "Math methods / Math.trunc",
  136. "es6.number.constructor": {
  137. features: [
  138. "octal and binary literals / octal supported by Number()",
  139. "octal and binary literals / binary supported by Number()",
  140. ],
  141. },
  142. "es6.number.epsilon": "Number properties / Number.EPSILON",
  143. "es6.number.is-finite": "Number properties / Number.isFinite",
  144. "es6.number.is-integer": "Number properties / Number.isInteger",
  145. "es6.number.is-nan": "Number properties / Number.isNaN",
  146. "es6.number.is-safe-integer": "Number properties / Number.isSafeInteger",
  147. "es6.number.max-safe-integer": "Number properties / Number.MAX_SAFE_INTEGER",
  148. "es6.number.min-safe-integer": "Number properties / Number.MIN_SAFE_INTEGER",
  149. "es6.number.parse-float": "Number properties / Number.parseFloat",
  150. "es6.number.parse-int": "Number properties / Number.parseInt",
  151. "es6.object.assign": {
  152. features: ["Object static methods / Object.assign", "Symbol"],
  153. },
  154. "es6.object.create": "Object static methods / Object.create",
  155. "es7.object.define-getter": {
  156. features: [
  157. "Object.prototype getter/setter methods / __defineGetter__",
  158. "Object.prototype getter/setter methods / __defineGetter__, symbols",
  159. "Object.prototype getter/setter methods / __defineGetter__, ToObject(this)",
  160. ],
  161. },
  162. "es7.object.define-setter": {
  163. features: [
  164. "Object.prototype getter/setter methods / __defineSetter__",
  165. "Object.prototype getter/setter methods / __defineSetter__, symbols",
  166. "Object.prototype getter/setter methods / __defineSetter__, ToObject(this)",
  167. ],
  168. },
  169. "es6.object.define-property": "Object static methods / Object.defineProperty",
  170. "es6.object.define-properties": "Object static methods / Object.defineProperties",
  171. "es7.object.entries": "Object static methods / Object.entries",
  172. "es6.object.freeze": "Object static methods accept primitives / Object.freeze",
  173. "es6.object.get-own-property-descriptor": "Object static methods accept primitives / Object.getOwnPropertyDescriptor",
  174. "es7.object.get-own-property-descriptors": "Object static methods / Object.getOwnPropertyDescriptors",
  175. "es6.object.get-own-property-names": "Object static methods accept primitives / Object.getOwnPropertyNames",
  176. "es6.object.get-prototype-of": "Object static methods accept primitives / Object.getPrototypeOf",
  177. "es7.object.lookup-getter": {
  178. features: [
  179. "Object.prototype getter/setter methods / __lookupGetter__",
  180. "Object.prototype getter/setter methods / __lookupGetter__, prototype chain",
  181. "Object.prototype getter/setter methods / __lookupGetter__, symbols",
  182. "Object.prototype getter/setter methods / __lookupGetter__, ToObject(this)",
  183. "Object.prototype getter/setter methods / __lookupGetter__, data properties can shadow accessors",
  184. ],
  185. },
  186. "es7.object.lookup-setter": {
  187. features: [
  188. "Object.prototype getter/setter methods / __lookupSetter__",
  189. "Object.prototype getter/setter methods / __lookupSetter__, prototype chain",
  190. "Object.prototype getter/setter methods / __lookupSetter__, symbols",
  191. "Object.prototype getter/setter methods / __lookupSetter__, ToObject(this)",
  192. "Object.prototype getter/setter methods / __lookupSetter__, data properties can shadow accessors",
  193. ],
  194. },
  195. "es6.object.prevent-extensions": "Object static methods accept primitives / Object.preventExtensions",
  196. "es6.object.to-string": "well-known symbols / Symbol.toStringTag",
  197. "es6.object.is": "Object static methods / Object.is",
  198. "es6.object.is-frozen": "Object static methods accept primitives / Object.isFrozen",
  199. "es6.object.is-sealed": "Object static methods accept primitives / Object.isSealed",
  200. "es6.object.is-extensible": "Object static methods accept primitives / Object.isExtensible",
  201. "es6.object.keys": "Object static methods accept primitives / Object.keys",
  202. "es6.object.seal": "Object static methods accept primitives / Object.seal",
  203. "es6.object.set-prototype-of": "Object static methods / Object.setPrototypeOf",
  204. "es7.object.values": "Object static methods / Object.values",
  205. "es6.promise": {
  206. features: [
  207. // required unhandled rejection tracking tests
  208. "Promise",
  209. "well-known symbols / Symbol.species, Promise.prototype.then",
  210. ],
  211. },
  212. "es7.promise.finally": "Promise.prototype.finally",
  213. "es6.reflect.apply": "Reflect / Reflect.apply",
  214. "es6.reflect.construct": "Reflect / Reflect.construct",
  215. "es6.reflect.define-property": "Reflect / Reflect.defineProperty",
  216. "es6.reflect.delete-property": "Reflect / Reflect.deleteProperty",
  217. "es6.reflect.get": "Reflect / Reflect.get",
  218. "es6.reflect.get-own-property-descriptor": "Reflect / Reflect.getOwnPropertyDescriptor",
  219. "es6.reflect.get-prototype-of": "Reflect / Reflect.getPrototypeOf",
  220. "es6.reflect.has": "Reflect / Reflect.has",
  221. "es6.reflect.is-extensible": "Reflect / Reflect.isExtensible",
  222. "es6.reflect.own-keys": "Reflect / Reflect.ownKeys",
  223. "es6.reflect.prevent-extensions": "Reflect / Reflect.preventExtensions",
  224. "es6.reflect.set": "Reflect / Reflect.set",
  225. "es6.reflect.set-prototype-of": "Reflect / Reflect.setPrototypeOf",
  226. "es6.regexp.constructor": {
  227. features: [
  228. "miscellaneous / RegExp constructor can alter flags",
  229. "well-known symbols / Symbol.match, RegExp constructor",
  230. ],
  231. },
  232. "es6.regexp.flags": "RegExp.prototype properties / RegExp.prototype.flags",
  233. "es6.regexp.match": "RegExp.prototype properties / RegExp.prototype[Symbol.match]",
  234. "es6.regexp.replace": "RegExp.prototype properties / RegExp.prototype[Symbol.replace]",
  235. "es6.regexp.split": "RegExp.prototype properties / RegExp.prototype[Symbol.split]",
  236. "es6.regexp.search": "RegExp.prototype properties / RegExp.prototype[Symbol.search]",
  237. "es6.regexp.to-string": "miscellaneous / RegExp.prototype.toString generic and uses \"flags\" property",
  238. // This is explicit due to prevent the stage-1 Set proposals under the
  239. // category "Set methods" from being included.
  240. "es6.set": {
  241. features: [
  242. "Set / basic functionality",
  243. "Set / constructor arguments",
  244. "Set / constructor requires new",
  245. "Set / constructor accepts null",
  246. "Set / constructor invokes add",
  247. "Set / iterator closing",
  248. "Set / Set.prototype.add returns this",
  249. "Set / -0 key converts to +0",
  250. "Set / Set.prototype.size",
  251. "Set / Set.prototype.delete",
  252. "Set / Set.prototype.clear",
  253. "Set / Set.prototype.forEach",
  254. "Set / Set.prototype.keys",
  255. "Set / Set.prototype.values",
  256. "Set / Set.prototype.entries",
  257. "Set / Set.prototype[Symbol.iterator]",
  258. "Set / Set.prototype isn't an instance",
  259. "Set / Set iterator prototype chain",
  260. "Set / Set[Symbol.species]",
  261. ],
  262. },
  263. "es6.symbol": {
  264. features: [
  265. "Symbol",
  266. "Object static methods / Object.getOwnPropertySymbols",
  267. "well-known symbols / Symbol.hasInstance",
  268. "well-known symbols / Symbol.isConcatSpreadable",
  269. "well-known symbols / Symbol.iterator",
  270. "well-known symbols / Symbol.match",
  271. "well-known symbols / Symbol.replace",
  272. "well-known symbols / Symbol.search",
  273. "well-known symbols / Symbol.species",
  274. "well-known symbols / Symbol.split",
  275. "well-known symbols / Symbol.toPrimitive",
  276. "well-known symbols / Symbol.toStringTag",
  277. "well-known symbols / Symbol.unscopables",
  278. ],
  279. },
  280. "es7.symbol.async-iterator": "Asynchronous Iterators",
  281. "es6.string.anchor": "String.prototype HTML methods",
  282. "es6.string.big": "String.prototype HTML methods",
  283. "es6.string.blink": "String.prototype HTML methods",
  284. "es6.string.bold": "String.prototype HTML methods",
  285. "es6.string.code-point-at": "String.prototype methods / String.prototype.codePointAt",
  286. "es6.string.ends-with": "String.prototype methods / String.prototype.endsWith",
  287. "es6.string.fixed": "String.prototype HTML methods",
  288. "es6.string.fontcolor": "String.prototype HTML methods",
  289. "es6.string.fontsize": "String.prototype HTML methods",
  290. "es6.string.from-code-point": "String static methods / String.fromCodePoint",
  291. "es6.string.includes": "String.prototype methods / String.prototype.includes",
  292. "es6.string.italics": "String.prototype HTML methods",
  293. "es6.string.iterator": "String.prototype methods / String.prototype[Symbol.iterator]",
  294. "es6.string.link": "String.prototype HTML methods",
  295. // "String.prototype methods / String.prototype.normalize" not implemented
  296. "es7.string.pad-start": "String padding / String.prototype.padStart",
  297. "es7.string.pad-end": "String padding / String.prototype.padEnd",
  298. "es6.string.raw": "String static methods / String.raw",
  299. "es6.string.repeat": "String.prototype methods / String.prototype.repeat",
  300. "es6.string.small": "String.prototype HTML methods",
  301. "es6.string.starts-with": "String.prototype methods / String.prototype.startsWith",
  302. "es6.string.strike": "String.prototype HTML methods",
  303. "es6.string.sub": "String.prototype HTML methods",
  304. "es6.string.sup": "String.prototype HTML methods",
  305. "es6.string.trim": "String properties and methods / String.prototype.trim",
  306. "es7.string.trim-left": "string trimming / String.prototype.trimStart",
  307. "es7.string.trim-right": "string trimming / String.prototype.trimEnd",
  308. "es6.typed.array-buffer": "typed arrays / ArrayBuffer[Symbol.species]",
  309. "es6.typed.data-view": "typed arrays / DataView",
  310. "es6.typed.int8-array": {
  311. features: ["typed arrays / Int8Array"].concat(typedArrayMethods),
  312. },
  313. "es6.typed.uint8-array": {
  314. features: ["typed arrays / Uint8Array"].concat(typedArrayMethods),
  315. },
  316. "es6.typed.uint8-clamped-array": {
  317. features: ["typed arrays / Uint8ClampedArray"].concat(typedArrayMethods),
  318. },
  319. "es6.typed.int16-array": {
  320. features: ["typed arrays / Int16Array"].concat(typedArrayMethods),
  321. },
  322. "es6.typed.uint16-array": {
  323. features: ["typed arrays / Uint16Array"].concat(typedArrayMethods),
  324. },
  325. "es6.typed.int32-array": {
  326. features: ["typed arrays / Int32Array"].concat(typedArrayMethods),
  327. },
  328. "es6.typed.uint32-array": {
  329. features: ["typed arrays / Uint32Array"].concat(typedArrayMethods),
  330. },
  331. "es6.typed.float32-array": {
  332. features: ["typed arrays / Float32Array"].concat(typedArrayMethods),
  333. },
  334. "es6.typed.float64-array": {
  335. features: ["typed arrays / Float64Array"].concat(typedArrayMethods),
  336. },
  337. "es6.weak-map": "WeakMap",
  338. "es6.weak-set": "WeakSet",
  339. };
  340. const proposals = require("./shipped-proposals").builtIns;
  341. module.exports = Object.assign({}, es, proposals);