Skip to content

Commit 74e9a3c

Browse files
Use tag instead of hash to fix updating (#1816)
* Use tag instead of hash to fix updating * Add test to ensure we don't revert back to hashes on this dep * Lint fix * Make test more explicit * Lint fix again
1 parent 9eff8b1 commit 74e9a3c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import fs from 'fs';
2+
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
5+
describe('Dependency format check', () => {
6+
it('should use a 13-digit numeric tag (not a commit hash or short hash) for @duckduckgo/privacy-configuration', () => {
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8'));
10+
const dep = pkg.dependencies['@duckduckgo/privacy-configuration'];
11+
// Only allow 13-digit numeric tags and not a commit hash or short hash
12+
expect(dep).toMatch(/^github:duckduckgo\/privacy-configuration#\d{13}$/);
13+
});
14+
});

0 commit comments

Comments
 (0)