-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop some amount of corejs also the file in git tree
Reasons for doing it this way: 1. this lets us easily see what is actually included in the fina core-js build by looking at k6-shim.js. The format there is probably going to change as it is copied from the core-js repo's shim.js, but the idea will stay 2. There is no need to have the shim.min.js in the git tree as it is already in lib/rice-box.go. Maybe after the golang embed proposal is available we can switch around, but this will likely take more then a year before we don't need to support a version of golang without it 3. go generate is awesome, but in this case it has way too many things that need to happen which makes it IMO a bad fit. This plus the fact that this will not be changed regularly means it is probably better this way.
- Loading branch information
Showing
8 changed files
with
244 additions
and
36 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
sha="a3616d74c0b9b9409d580337e04c32da6e3877e4" # v2.5.1 | ||
mkdir -p ./corejs-repo | ||
cd ./corejs-repo | ||
git init | ||
git remote add origin https://github.com/zloirock/core-js.git | ||
git fetch origin --depth=1 "${sha}" | ||
git reset --hard "${sha}" | ||
cp ../k6-shim.js shim.js | ||
cp ../corejs-build.sh corejs-build.sh | ||
docker run --user "$UID:$GID" --rm -ti -v $(pwd):/opt/g --entrypoint /opt/g/corejs-build.sh --workdir /opt/g node | ||
cp custom.min.js ../shim.min.js | ||
cd - | ||
rm -rf corejs-repo | ||
mkdir core-js | ||
mv shim.min.js core-js/shim.min.js | ||
rice embed-go | ||
rm -rf core-js |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
npm i . | ||
modules="$(cat shim.js | grep ^require | sed "s|require('\./modules/||g" | sed "s/');//g" | tr "\n" ",")" | ||
npm run grunt "build:${modules}" "--library=off" "--path=custom" "uglify" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
//require('./modules/es6.symbol'); // in goja or promises | ||
//require('./modules/es6.object.create'); | ||
//require('./modules/es6.object.define-property'); | ||
//require('./modules/es6.object.define-properties'); | ||
//require('./modules/es6.object.get-own-property-descriptor'); | ||
//require('./modules/es6.object.get-prototype-of'); | ||
//require('./modules/es6.object.keys'); | ||
//require('./modules/es6.object.get-own-property-names'); | ||
//require('./modules/es6.object.freeze'); | ||
//require('./modules/es6.object.seal'); | ||
//require('./modules/es6.object.prevent-extensions'); | ||
//require('./modules/es6.object.is-frozen'); | ||
//require('./modules/es6.object.is-sealed'); | ||
//require('./modules/es6.object.is-extensible'); | ||
//require('./modules/es6.object.assign'); | ||
//require('./modules/es6.object.is'); | ||
//require('./modules/es6.object.set-prototype-of'); | ||
//require('./modules/es6.object.to-string'); | ||
//require('./modules/es6.function.bind'); | ||
//require('./modules/es6.function.name'); | ||
//require('./modules/es6.function.has-instance'); | ||
//require('./modules/es6.parse-int'); | ||
//require('./modules/es6.parse-float'); | ||
//require('./modules/es6.number.constructor'); | ||
//require('./modules/es6.number.to-fixed'); | ||
//require('./modules/es6.number.to-precision'); | ||
//require('./modules/es6.number.epsilon'); | ||
//require('./modules/es6.number.is-finite'); | ||
//require('./modules/es6.number.is-integer'); | ||
//require('./modules/es6.number.is-nan'); | ||
//require('./modules/es6.number.is-safe-integer'); | ||
//require('./modules/es6.number.max-safe-integer'); | ||
//require('./modules/es6.number.min-safe-integer'); | ||
//require('./modules/es6.number.parse-float'); | ||
//require('./modules/es6.number.parse-int'); | ||
//require('./modules/es6.math.acosh'); | ||
//require('./modules/es6.math.asinh'); | ||
//require('./modules/es6.math.atanh'); | ||
//require('./modules/es6.math.cbrt'); | ||
//require('./modules/es6.math.clz32'); | ||
//require('./modules/es6.math.cosh'); | ||
//require('./modules/es6.math.expm1'); | ||
//require('./modules/es6.math.fround'); | ||
//require('./modules/es6.math.hypot'); | ||
//require('./modules/es6.math.imul'); | ||
//require('./modules/es6.math.log10'); | ||
//require('./modules/es6.math.log1p'); | ||
//require('./modules/es6.math.log2'); | ||
//require('./modules/es6.math.sign'); | ||
//require('./modules/es6.math.sinh'); | ||
//require('./modules/es6.math.tanh'); | ||
//require('./modules/es6.math.trunc'); | ||
//require('./modules/es6.string.from-code-point'); | ||
//require('./modules/es6.string.raw'); | ||
//require('./modules/es6.string.trim'); | ||
//require('./modules/es6.string.iterator'); | ||
//require('./modules/es6.string.code-point-at'); | ||
//require('./modules/es6.string.ends-with'); | ||
//require('./modules/es6.string.includes'); | ||
//require('./modules/es6.string.repeat'); | ||
//require('./modules/es6.string.starts-with'); | ||
//require('./modules/es6.string.anchor'); | ||
//require('./modules/es6.string.big'); | ||
//require('./modules/es6.string.blink'); | ||
//require('./modules/es6.string.bold'); | ||
//require('./modules/es6.string.fixed'); | ||
//require('./modules/es6.string.fontcolor'); | ||
//require('./modules/es6.string.fontsize'); | ||
//require('./modules/es6.string.italics'); | ||
//require('./modules/es6.string.link'); | ||
//require('./modules/es6.string.small'); | ||
//require('./modules/es6.string.strike'); | ||
//require('./modules/es6.string.sub'); | ||
//require('./modules/es6.string.sup'); | ||
//require('./modules/es6.date.now'); | ||
//require('./modules/es6.date.to-json'); | ||
//require('./modules/es6.date.to-iso-string'); | ||
//require('./modules/es6.date.to-string'); | ||
//require('./modules/es6.date.to-primitive'); | ||
//require('./modules/es6.array.is-array'); | ||
//require('./modules/es6.array.from'); | ||
//require('./modules/es6.array.of'); | ||
//require('./modules/es6.array.join'); | ||
//require('./modules/es6.array.slice'); | ||
//require('./modules/es6.array.sort'); | ||
//require('./modules/es6.array.for-each'); | ||
//require('./modules/es6.array.map'); | ||
//require('./modules/es6.array.filter'); | ||
//require('./modules/es6.array.some'); | ||
//require('./modules/es6.array.every'); | ||
//require('./modules/es6.array.reduce'); | ||
//require('./modules/es6.array.reduce-right'); | ||
//require('./modules/es6.array.index-of'); | ||
//require('./modules/es6.array.last-index-of'); | ||
//require('./modules/es6.array.copy-within'); | ||
//require('./modules/es6.array.fill'); | ||
//require('./modules/es6.array.find'); | ||
//require('./modules/es6.array.find-index'); | ||
//require('./modules/es6.array.species'); | ||
//require('./modules/es6.array.iterator'); | ||
//require('./modules/es6.regexp.constructor'); | ||
//require('./modules/es6.regexp.to-string'); | ||
//require('./modules/es6.regexp.flags'); | ||
//require('./modules/es6.regexp.match'); | ||
//require('./modules/es6.regexp.replace'); | ||
//require('./modules/es6.regexp.search'); | ||
//require('./modules/es6.regexp.split'); | ||
//require('./modules/es6.promise'); | ||
//require('./modules/es6.map'); | ||
//require('./modules/es6.set'); | ||
//require('./modules/es6.weak-map'); | ||
//require('./modules/es6.weak-set'); | ||
//require('./modules/es6.typed.array-buffer'); | ||
//require('./modules/es6.typed.data-view'); | ||
//require('./modules/es6.typed.int8-array'); | ||
//require('./modules/es6.typed.uint8-array'); | ||
//require('./modules/es6.typed.uint8-clamped-array'); | ||
//require('./modules/es6.typed.int16-array'); | ||
//require('./modules/es6.typed.uint16-array'); | ||
//require('./modules/es6.typed.int32-array'); | ||
//require('./modules/es6.typed.uint32-array'); | ||
//require('./modules/es6.typed.float32-array'); | ||
//require('./modules/es6.typed.float64-array'); | ||
//require('./modules/es6.reflect.apply'); | ||
//require('./modules/es6.reflect.construct'); | ||
//require('./modules/es6.reflect.define-property'); | ||
//require('./modules/es6.reflect.delete-property'); | ||
//require('./modules/es6.reflect.enumerate'); | ||
//require('./modules/es6.reflect.get'); | ||
//require('./modules/es6.reflect.get-own-property-descriptor'); | ||
//require('./modules/es6.reflect.get-prototype-of'); | ||
//require('./modules/es6.reflect.has'); | ||
//require('./modules/es6.reflect.is-extensible'); | ||
//require('./modules/es6.reflect.own-keys'); | ||
//require('./modules/es6.reflect.prevent-extensions'); | ||
//require('./modules/es6.reflect.set'); | ||
//require('./modules/es6.reflect.set-prototype-of'); | ||
//require('./modules/es7.array.includes'); // in goja | ||
require('./modules/es7.array.flat-map'); | ||
// this is now called flat, so maybe drop it https://github.com/tc39/proposal-flatMap | ||
require('./modules/es7.array.flatten'); | ||
//require('./modules/es7.string.at'); // it is in es2020 but is with completely different semantics | ||
//require('./modules/es7.string.pad-start'); // in goja | ||
//require('./modules/es7.string.pad-end'); // in goja | ||
require('./modules/es7.string.trim-left'); | ||
require('./modules/es7.string.trim-right'); | ||
require('./modules/es7.string.match-all'); | ||
//require('./modules/es7.symbol.async-iterator'); // async | ||
//require('./modules/es7.symbol.observable'); | ||
require('./modules/es7.object.get-own-property-descriptors'); | ||
require('./modules/es7.object.values'); | ||
require('./modules/es7.object.entries'); | ||
require('./modules/es7.object.define-getter'); | ||
require('./modules/es7.object.define-setter'); | ||
require('./modules/es7.object.lookup-getter'); | ||
require('./modules/es7.object.lookup-setter'); | ||
// require('./modules/es7.map.to-json'); // not actually in the standard | ||
//require('./modules/es7.set.to-json'); | ||
//require('./modules/es7.map.of'); | ||
//require('./modules/es7.set.of'); | ||
//require('./modules/es7.weak-map.of'); | ||
//require('./modules/es7.weak-set.of'); | ||
//require('./modules/es7.map.from'); | ||
//require('./modules/es7.set.from'); | ||
//require('./modules/es7.weak-map.from'); | ||
//require('./modules/es7.weak-set.from'); | ||
//require('es7.global'); // is now globalThis, goja has globasl | ||
//require('es7.system.global'); // dropped .. I think | ||
//require('es7.error.is-error'); // dropped | ||
//require('./modules/es7.math.clamp'); // not actually in the standard | ||
//require('./modules/es7.math.deg-per-rad'); | ||
//require('./modules/es7.math.degrees'); | ||
//require('./modules/es7.math.fscale'); | ||
//require('./modules/es7.math.iaddh'); | ||
//require('./modules/es7.math.isubh'); | ||
//require('./modules/es7.math.imulh'); | ||
//require('./modules/es7.math.rad-per-deg'); | ||
//require('./modules/es7.math.radians'); | ||
//require('./modules/es7.math.scale'); | ||
//require('./modules/es7.math.umulh'); | ||
//require('./modules/es7.math.signbit'); | ||
//require('./modules/es7.promise.finally'); // promises | ||
//require('./modules/es7.promise.try'); | ||
require('./modules/es7.reflect.define-metadata'); | ||
require('./modules/es7.reflect.delete-metadata'); | ||
require('./modules/es7.reflect.get-metadata'); | ||
require('./modules/es7.reflect.get-metadata-keys'); | ||
require('./modules/es7.reflect.get-own-metadata'); | ||
require('./modules/es7.reflect.get-own-metadata-keys'); | ||
require('./modules/es7.reflect.has-metadata'); | ||
require('./modules/es7.reflect.has-own-metadata'); | ||
require('./modules/es7.reflect.metadata'); | ||
//require('./modules/es7.asap'); // promises | ||
//require('./modules/es7.observable'); | ||
//require('./modules/web.timers'); // web stuff | ||
//require('./modules/web.immediate'); | ||
//require('./modules/web.dom.iterable'); | ||
// module.exports = require('./modules/_core'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ | |
* | ||
*/ | ||
|
||
//go:generate rice embed-go | ||
|
||
package lib | ||
|
||
import ( | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.