@link-assistant/web-capture 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@link-assistant/web-capture",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "CLI and microservice to render web pages as HTML, Markdown, or PNG",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"playwright": "^1.49.0",
|
|
45
45
|
"puppeteer": "^24.8.2",
|
|
46
46
|
"puppeteer-core": "^24.40.0",
|
|
47
|
-
"turndown": "^7.1.1"
|
|
47
|
+
"turndown": "^7.1.1",
|
|
48
|
+
"turndown-plugin-gfm": "^1.0.2"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@babel/core": "^7.24.0",
|
|
@@ -62,8 +63,7 @@
|
|
|
62
63
|
"lint-staged": "^16.2.6",
|
|
63
64
|
"nock": "^13.5.4",
|
|
64
65
|
"prettier": "^3.6.2",
|
|
65
|
-
"supertest": "^6.3.4"
|
|
66
|
-
"turndown-plugin-gfm": "^1.0.2"
|
|
66
|
+
"supertest": "^6.3.4"
|
|
67
67
|
},
|
|
68
68
|
"type": "module",
|
|
69
69
|
"keywords": [
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { dirname, resolve } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
const jsRoot = resolve(__dirname, '../..');
|
|
8
|
+
|
|
9
|
+
function readJson(relativePath) {
|
|
10
|
+
return JSON.parse(readFileSync(resolve(jsRoot, relativePath), 'utf8'));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const runtimeImports = [
|
|
14
|
+
{
|
|
15
|
+
packageName: 'turndown-plugin-gfm',
|
|
16
|
+
sourceFile: 'src/lib.js',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
describe('runtime package dependencies', () => {
|
|
21
|
+
test.each(runtimeImports)(
|
|
22
|
+
'$packageName is declared as a production dependency',
|
|
23
|
+
({ packageName, sourceFile }) => {
|
|
24
|
+
const source = readFileSync(resolve(jsRoot, sourceFile), 'utf8');
|
|
25
|
+
const packageJson = readJson('package.json');
|
|
26
|
+
|
|
27
|
+
expect(source).toContain(`from '${packageName}'`);
|
|
28
|
+
expect(packageJson.dependencies).toHaveProperty(packageName);
|
|
29
|
+
expect(packageJson.devDependencies || {}).not.toHaveProperty(packageName);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
test.each(runtimeImports)(
|
|
34
|
+
'$packageName is not marked dev-only in package-lock.json',
|
|
35
|
+
({ packageName }) => {
|
|
36
|
+
const packageLock = readJson('package-lock.json');
|
|
37
|
+
|
|
38
|
+
expect(packageLock.packages[''].dependencies).toHaveProperty(packageName);
|
|
39
|
+
expect(packageLock.packages[''].devDependencies || {}).not.toHaveProperty(
|
|
40
|
+
packageName
|
|
41
|
+
);
|
|
42
|
+
expect(packageLock.packages[`node_modules/${packageName}`]).toBeDefined();
|
|
43
|
+
expect(packageLock.packages[`node_modules/${packageName}`].dev).not.toBe(
|
|
44
|
+
true
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
});
|