microsoft / vscode-iconv-lite-umd Goto Github PK
View Code? Open in Web Editor NEWA UMD version of iconv-lite to be used in VSCode.
License: MIT License
A UMD version of iconv-lite to be used in VSCode.
License: MIT License
Steps to Reproduce:
I guess it's the encoding guessing algorithm
Does this issue occur when all extensions are disabled?: Yes
@bpasero refs #5 (comment)
@gyzerok oh, it would be great if yarn could run as part of the
prepublish
to fix that in the future.
I've looked into it a bit. Unfortunately when you run yarn
the prepublish
hook is called automatically. Which means that if you put yarn
inside prepublish
, you get an infinite loop of installs.
Personally I've had great experiences publishing to npm
from CI. This way you just push the new tag and CI will do the rest: install, build and publish.
If it sounds good I think you can use GitHub Actions to make this work. Unfortunately I can't really make it myself since you need to generate an npm secret to make it work.
where is the lib folder?
I did an experiment where I let all tests from iconv-lite
run against this webpacked version. Here are the steps:
test
folder of iconv-lite
into the root of this projectdevDependencies
of iconv-lite
into the package.json
of this project"test": "mocha --reporter spec --grep ."
over into the scripts
section of the package.json
of this projectwebpack.config.js
target: "node"
but the default (web)yarn test
The result is a couple of test failures:
1) Full DBCS encoding tests Encode DBCS encoding 'shiftjis':
Error: Bad argument.
at convert (node_modules/iconv/lib/iconv.js:103:11)
at Iconv.convert (node_modules/iconv/lib/iconv.js:64:12)
at convertWithDefault (test/dbcs-test.js:44:26)
at Context.<anonymous> (test/dbcs-test.js:230:32)
at processImmediate (internal/timers.js:456:21)
2) Full DBCS encoding tests Encode DBCS encoding 'eucjp':
Error: Bad argument.
at convert (node_modules/iconv/lib/iconv.js:103:11)
at Iconv.convert (node_modules/iconv/lib/iconv.js:64:12)
at convertWithDefault (test/dbcs-test.js:44:26)
at Context.<anonymous> (test/dbcs-test.js:230:32)
at processImmediate (internal/timers.js:456:21)
3) Full DBCS encoding tests Encode DBCS encoding 'gb18030':
Error: Bad argument.
at convert (node_modules/iconv/lib/iconv.js:103:11)
at Iconv.convert (node_modules/iconv/lib/iconv.js:64:12)
at convertWithDefault (test/dbcs-test.js:44:26)
at Context.<anonymous> (test/dbcs-test.js:230:32)
at processImmediate (internal/timers.js:456:21)
4) Full DBCS encoding tests Encode DBCS encoding 'cp950':
Error: Bad argument.
at convert (node_modules/iconv/lib/iconv.js:103:11)
at Iconv.convert (node_modules/iconv/lib/iconv.js:64:12)
at convertWithDefault (test/dbcs-test.js:44:26)
at Context.<anonymous> (test/dbcs-test.js:230:32)
at processImmediate (internal/timers.js:456:21)
5) Full DBCS encoding tests Encode DBCS encoding 'big5hkscs':
Error: Bad argument.
at convert (node_modules/iconv/lib/iconv.js:103:11)
at Iconv.convert (node_modules/iconv/lib/iconv.js:64:12)
at convertWithDefault (test/dbcs-test.js:44:26)
at Context.<anonymous> (test/dbcs-test.js:230:32)
at processImmediate (internal/timers.js:456:21)
6) Generic UTF8-UCS2 tests Return values are of correct types:
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(Buffer.isBuffer(iconv.encode(testString, "utf8")))
+ expected - actual
-false
+true
at Context.<anonymous> (test/main-test.js:13:16)
at processImmediate (internal/timers.js:456:21)
7) Generic UTF8-UCS2 tests Convert to string, not buffer (utf8 used):
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(Buffer.isBuffer(res))
+ expected - actual
-false
+true
at Context.<anonymous> (test/main-test.js:43:16)
at processImmediate (internal/timers.js:456:21)
8) UTF-16 decoder handles very short buffers nice:
AssertionError [ERR_ASSERTION]: '\u0000' == ''
+ expected - actual
-�
at Context.<anonymous> (test/utf16-test.js:45:16)
at processImmediate (internal/timers.js:456:21)
@gyzerok @ashtuchkin this worries me a bit. Some notes:
target: "node"
(not to any surprise)[email protected]
I would appreciate some help in fixing these issues as they would probably block the July release where I would like to go back to the webpacked version that does not target node. Thanks.
The README.md doesn't even say what this software is about...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.