@tryghost/mg-linkfixer 0.3.1 → 0.4.0

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/index.js CHANGED
@@ -1 +1,3 @@
1
- module.exports = require('./lib/LinkFixer');
1
+ import LinkFixer from './lib/LinkFixer.js';
2
+
3
+ export default LinkFixer;
package/lib/LinkFixer.js CHANGED
@@ -1,6 +1,6 @@
1
- const path = require('path');
2
- const _ = require('lodash');
3
- const cheerio = require('cheerio');
1
+ import path from 'node:path';
2
+ import _ from 'lodash';
3
+ import cheerio from 'cheerio';
4
4
 
5
5
  // @TODO: expand this list
6
6
  const htmlFields = ['html'];
@@ -133,4 +133,4 @@ class LinkFixer {
133
133
  }
134
134
  }
135
135
 
136
- module.exports = LinkFixer;
136
+ export default LinkFixer;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tryghost/mg-linkfixer",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-linkfixer",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
+ "type": "module",
8
9
  "scripts": {
9
10
  "dev": "echo \"Implement me!\"",
10
- "test": "NODE_ENV=testing mocha './test/**/*.test.js'",
11
+ "test": "node --experimental-vm-modules $(yarn bin jest)",
11
12
  "lint": "eslint . --ext .js --cache",
12
13
  "posttest": "yarn lint"
13
14
  },
@@ -19,13 +20,15 @@
19
20
  "access": "public"
20
21
  },
21
22
  "devDependencies": {
22
- "mocha": "10.0.0",
23
- "should": "13.2.3",
24
- "sinon": "14.0.0"
23
+ "@tryghost/listr-smart-renderer": "^0.3.0",
24
+ "eslint": "8.25.0",
25
+ "jest": "29.1.2",
26
+ "jest-extended": "3.1.0",
27
+ "listr": "0.14.3"
25
28
  },
26
29
  "dependencies": {
27
30
  "cheerio": "^1.0.0-rc.3",
28
31
  "lodash": "4.17.21"
29
32
  },
30
- "gitHead": "370c7f9973e7518cfb6433e694c8fbbf022c32cf"
33
+ "gitHead": "35cb5c1ca6a826e1e596c4f2e209ab690fa06fa0"
31
34
  }