Update: This is caused by npm/cli#3405. npm pack outputs the filename in its info as @pakage/foo.tar.gz, but actually saves it as package/foo.tar.gz. As a result, when dts-critic does to open that tar.gz, it has the wrong filename, and the tests fail. This happens on newer npm versions, and can be worked around by using npm v6.
When running npm run test locally, I am getting the following error:
➜ DefinitelyTyped git:(update/wp-components-v17) npm run test wordpress__components
> definitely-typed@0.0.3 test
> dtslint types "wordpress__components"
tar (child): @wordpress/components-17.0.0.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
I get the same error whether I use @wordpress/components or wordpress__components. From what I can tell, the file is being saved, but without the leading @ symbol. For example:
➜ DefinitelyTyped git:(update/wp-components-v17) npm run test @wordpress/components
> definitely-typed@0.0.3 test
> dtslint types "@wordpress/components"
tar (child): @wordpress/components-17.0.0.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
➜ DefinitelyTyped git:(update/wp-components-v17) ls word*
wordpress-components-17.0.0.tgz
So it attempts to open @wordpress/components..., but the saved file is actually wordpress/components.... I poked around in dtslint, but I couldn't find anywhere it tries to run tar commands.
Update: This is caused by npm/cli#3405.
npm packoutputs the filename in its info as@pakage/foo.tar.gz, but actually saves it aspackage/foo.tar.gz. As a result, whendts-criticdoes to open that tar.gz, it has the wrong filename, and the tests fail. This happens on newer npm versions, and can be worked around by using npm v6.When running
npm run testlocally, I am getting the following error:I get the same error whether I use
@wordpress/componentsorwordpress__components. From what I can tell, the file is being saved, but without the leading@symbol. For example:So it attempts to open
@wordpress/components..., but the saved file is actuallywordpress/components.... I poked around indtslint, but I couldn't find anywhere it tries to runtarcommands.