mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-10 22:00:58 +01:00
Fix esm build named exports
This commit is contained in:
parent
8d5f9c70f8
commit
d0382badcc
8 changed files with 77 additions and 68 deletions
|
@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.2] - 2020-11-19
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix esm build named exports.
|
||||||
|
|
||||||
|
|
||||||
## [2.0.1] - 2020-11-17
|
## [2.0.1] - 2020-11-17
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -161,6 +167,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- First release.
|
- First release.
|
||||||
|
|
||||||
|
|
||||||
|
[2.0.2]: https://github.com/nodeca/pako/compare/2.0.1...2.0.2
|
||||||
[2.0.1]: https://github.com/nodeca/pako/compare/2.0.0...2.0.1
|
[2.0.1]: https://github.com/nodeca/pako/compare/2.0.0...2.0.1
|
||||||
[2.0.0]: https://github.com/nodeca/pako/compare/1.0.11...2.0.0
|
[2.0.0]: https://github.com/nodeca/pako/compare/1.0.11...2.0.0
|
||||||
[1.0.10]: https://github.com/nodeca/pako/compare/1.0.10...1.0.11
|
[1.0.10]: https://github.com/nodeca/pako/compare/1.0.10...1.0.11
|
||||||
|
|
14
index.js
14
index.js
|
@ -7,8 +7,12 @@ const { Inflate, inflate, inflateRaw, ungzip } = require('./lib/inflate');
|
||||||
|
|
||||||
const constants = require('./lib/zlib/constants');
|
const constants = require('./lib/zlib/constants');
|
||||||
|
|
||||||
module.exports = {
|
module.exports.Deflate = Deflate;
|
||||||
Deflate, deflate, deflateRaw, gzip,
|
module.exports.deflate = deflate;
|
||||||
Inflate, inflate, inflateRaw, ungzip,
|
module.exports.deflateRaw = deflateRaw;
|
||||||
constants
|
module.exports.gzip = gzip;
|
||||||
};
|
module.exports.Inflate = Inflate;
|
||||||
|
module.exports.inflate = inflate;
|
||||||
|
module.exports.inflateRaw = inflateRaw;
|
||||||
|
module.exports.ungzip = ungzip;
|
||||||
|
module.exports.constants = constants;
|
||||||
|
|
|
@ -373,10 +373,8 @@ function gzip(input, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports.Deflate = Deflate;
|
||||||
Deflate,
|
module.exports.deflate = deflate;
|
||||||
deflate,
|
module.exports.deflateRaw = deflateRaw;
|
||||||
deflateRaw,
|
module.exports.gzip = gzip;
|
||||||
gzip,
|
module.exports.constants = require('./zlib/constants');
|
||||||
constants: require('./zlib/constants')
|
|
||||||
};
|
|
||||||
|
|
|
@ -412,10 +412,8 @@ function inflateRaw(input, options) {
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports.Inflate = Inflate;
|
||||||
Inflate,
|
module.exports.inflate = inflate;
|
||||||
inflate,
|
module.exports.inflateRaw = inflateRaw;
|
||||||
inflateRaw,
|
module.exports.ungzip = inflate;
|
||||||
ungzip: inflate,
|
module.exports.constants = require('./zlib/constants');
|
||||||
constants: require('./zlib/constants')
|
|
||||||
};
|
|
||||||
|
|
|
@ -1830,21 +1830,21 @@ const deflateSetDictionary = (strm, dictionary) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
exports.deflateInit = deflateInit;
|
module.exports.deflateInit = deflateInit;
|
||||||
exports.deflateInit2 = deflateInit2;
|
module.exports.deflateInit2 = deflateInit2;
|
||||||
exports.deflateReset = deflateReset;
|
module.exports.deflateReset = deflateReset;
|
||||||
exports.deflateResetKeep = deflateResetKeep;
|
module.exports.deflateResetKeep = deflateResetKeep;
|
||||||
exports.deflateSetHeader = deflateSetHeader;
|
module.exports.deflateSetHeader = deflateSetHeader;
|
||||||
exports.deflate = deflate;
|
module.exports.deflate = deflate;
|
||||||
exports.deflateEnd = deflateEnd;
|
module.exports.deflateEnd = deflateEnd;
|
||||||
exports.deflateSetDictionary = deflateSetDictionary;
|
module.exports.deflateSetDictionary = deflateSetDictionary;
|
||||||
exports.deflateInfo = 'pako deflate (from Nodeca project)';
|
module.exports.deflateInfo = 'pako deflate (from Nodeca project)';
|
||||||
|
|
||||||
/* Not implemented
|
/* Not implemented
|
||||||
exports.deflateBound = deflateBound;
|
module.exports.deflateBound = deflateBound;
|
||||||
exports.deflateCopy = deflateCopy;
|
module.exports.deflateCopy = deflateCopy;
|
||||||
exports.deflateParams = deflateParams;
|
module.exports.deflateParams = deflateParams;
|
||||||
exports.deflatePending = deflatePending;
|
module.exports.deflatePending = deflatePending;
|
||||||
exports.deflatePrime = deflatePrime;
|
module.exports.deflatePrime = deflatePrime;
|
||||||
exports.deflateTune = deflateTune;
|
module.exports.deflateTune = deflateTune;
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1525,23 +1525,23 @@ const inflateSetDictionary = (strm, dictionary) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
exports.inflateReset = inflateReset;
|
module.exports.inflateReset = inflateReset;
|
||||||
exports.inflateReset2 = inflateReset2;
|
module.exports.inflateReset2 = inflateReset2;
|
||||||
exports.inflateResetKeep = inflateResetKeep;
|
module.exports.inflateResetKeep = inflateResetKeep;
|
||||||
exports.inflateInit = inflateInit;
|
module.exports.inflateInit = inflateInit;
|
||||||
exports.inflateInit2 = inflateInit2;
|
module.exports.inflateInit2 = inflateInit2;
|
||||||
exports.inflate = inflate;
|
module.exports.inflate = inflate;
|
||||||
exports.inflateEnd = inflateEnd;
|
module.exports.inflateEnd = inflateEnd;
|
||||||
exports.inflateGetHeader = inflateGetHeader;
|
module.exports.inflateGetHeader = inflateGetHeader;
|
||||||
exports.inflateSetDictionary = inflateSetDictionary;
|
module.exports.inflateSetDictionary = inflateSetDictionary;
|
||||||
exports.inflateInfo = 'pako inflate (from Nodeca project)';
|
module.exports.inflateInfo = 'pako inflate (from Nodeca project)';
|
||||||
|
|
||||||
/* Not implemented
|
/* Not implemented
|
||||||
exports.inflateCopy = inflateCopy;
|
module.exports.inflateCopy = inflateCopy;
|
||||||
exports.inflateGetDictionary = inflateGetDictionary;
|
module.exports.inflateGetDictionary = inflateGetDictionary;
|
||||||
exports.inflateMark = inflateMark;
|
module.exports.inflateMark = inflateMark;
|
||||||
exports.inflatePrime = inflatePrime;
|
module.exports.inflatePrime = inflatePrime;
|
||||||
exports.inflateSync = inflateSync;
|
module.exports.inflateSync = inflateSync;
|
||||||
exports.inflateSyncPoint = inflateSyncPoint;
|
module.exports.inflateSyncPoint = inflateSyncPoint;
|
||||||
exports.inflateUndermine = inflateUndermine;
|
module.exports.inflateUndermine = inflateUndermine;
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1222,8 +1222,8 @@ const _tr_tally = (s, dist, lc) =>
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
exports._tr_init = _tr_init;
|
module.exports._tr_init = _tr_init;
|
||||||
exports._tr_stored_block = _tr_stored_block;
|
module.exports._tr_stored_block = _tr_stored_block;
|
||||||
exports._tr_flush_block = _tr_flush_block;
|
module.exports._tr_flush_block = _tr_flush_block;
|
||||||
exports._tr_tally = _tr_tally;
|
module.exports._tr_tally = _tr_tally;
|
||||||
exports._tr_align = _tr_align;
|
module.exports._tr_align = _tr_align;
|
||||||
|
|
|
@ -24,30 +24,32 @@ const plugins_es5 = [
|
||||||
banner
|
banner
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const umd_out_base = { format: 'umd', name: 'pako', exports: 'named' };
|
||||||
|
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
// es6
|
// es6
|
||||||
{
|
{
|
||||||
input: 'index.js',
|
input: 'index.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako.js' },
|
||||||
{ file: 'dist/pako.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins
|
plugins: plugins
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: 'lib/deflate.js',
|
input: 'lib/deflate.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako_deflate.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako_deflate.js' },
|
||||||
{ file: 'dist/pako_deflate.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako_deflate.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins
|
plugins: plugins
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: 'lib/inflate.js',
|
input: 'lib/inflate.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako_inflate.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako_inflate.js' },
|
||||||
{ file: 'dist/pako_inflate.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako_inflate.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins
|
plugins: plugins
|
||||||
},
|
},
|
||||||
|
@ -55,24 +57,24 @@ export default [
|
||||||
{
|
{
|
||||||
input: 'index.js',
|
input: 'index.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako.es5.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako.es5.js' },
|
||||||
{ file: 'dist/pako.es5.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako.es5.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins_es5
|
plugins: plugins_es5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: 'lib/deflate.js',
|
input: 'lib/deflate.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako_deflate.es5.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako_deflate.es5.js' },
|
||||||
{ file: 'dist/pako_deflate.es5.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako_deflate.es5.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins_es5
|
plugins: plugins_es5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: 'lib/inflate.js',
|
input: 'lib/inflate.js',
|
||||||
output: [
|
output: [
|
||||||
{ file: 'dist/pako_inflate.es5.js', format: 'umd', name: 'pako' },
|
{ ...umd_out_base, file: 'dist/pako_inflate.es5.js' },
|
||||||
{ file: 'dist/pako_inflate.es5.min.js', format: 'umd', name: 'pako', plugins: [ terser() ] }
|
{ ...umd_out_base, file: 'dist/pako_inflate.es5.min.js', plugins: [ terser() ] }
|
||||||
],
|
],
|
||||||
plugins: plugins_es5
|
plugins: plugins_es5
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue