-
Notifications
You must be signed in to change notification settings - Fork 63
PR #1081 does not fully fix type errors #1083
Comments
Ts file should not be present I agree, I will give it a look |
Just tested with v4.4.0 and the package types are still broken. Since this is a critical blocking issue, but easy to fix (see #1110), we will republish until there is an official fix.
|
Since the current fix #1113 (removing ts files) is another way of solving #1074, it looks like the changes from #1081 became unnecessary and might be reverted. Compile-time file resolution should work fine when |
@garth to unblock myself, I used the following package.json "scripts": {
"postinstall": "node tools/js-api-fix.js",
} tools/js-api-fix.js const glob = require('glob');
const fs = require('fs');
glob('node_modules/@alfresco/js-api/**/!(*.d).ts', (err, files) => {
if (err) throw err;
console.log(`Fix @alfresco/js-api package issue: https://github.com/Alfresco/alfresco-js-api/issues/1074`);
console.log(`Remove ${files.length} *.ts files from directory configured only for typings`);
files.forEach(file => {
console.log(`remove "${file}"`);
fs.unlinkSync(file);
});
}); Hope it helps |
Fixed with the latest builds |
Type of issue: (check with "[x]")
Current behavior:
In the build output, after #1081 was merged, type files (.d.ts) are now separated, but the generated .js and .map are still distributed alongside the original .ts files, which in some cases still causes the .ts versions to be picked up and errors are raised.
Expected behavior:
.ts files are probably not needed for npm package? but at least the build output should be restructured so that .d.ts, .js and .map files are together and .ts are separated.
Steps to reproduce the issue:
Reference
@alfresco/js-api
in unit tests (jest) and the following error is raised.Remove the
legacy.ts
file and the error is gone (though the next alfresco .ts file found will raise).Node version (for build issues):
node: 15.14.0
New feature request:
The text was updated successfully, but these errors were encountered: