Skip to content

Commit 108f965

Browse files
committed
Test
1 parent 41554dc commit 108f965

File tree

42 files changed

+75
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+75
-133
lines changed

packages/url-utils/package.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,37 @@
99
"author": "Ghost Foundation",
1010
"license": "MIT",
1111
"main": "cjs/UrlUtils.js",
12-
"module": "es/UrlUtils.js",
13-
"umd:main": "umd/url-utils.min.js",
1412
"types": "types/src/UrlUtils.d.ts",
1513
"source": "src/UrlUtils.ts",
1614
"scripts": {
1715
"dev": "echo \"Implement me!\"",
1816
"pretest": "yarn build",
19-
"test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --reporter html mocha './test/**/*.test.js'",
20-
"build": "rollup -c && tsc --declaration --emitDeclarationOnly --declarationDir ./types && tsc --module commonjs --outDir ./cjs/utils --rootDir ./src/utils --target es2016 --esModuleInterop true --skipLibCheck true src/utils/*.ts",
17+
"test": "NODE_ENV=testing TS_NODE_PROJECT=tsconfig.test.json c8 --src src --all --reporter text --reporter cobertura --reporter html mocha -r ts-node/register './test/**/*.test.js'",
18+
"build": "tsc -p tsconfig.json",
2119
"lint": "eslint . --ext .js,.ts --cache",
2220
"prepare": "NODE_ENV=production yarn build",
2321
"posttest": "yarn lint"
2422
},
2523
"files": [
2624
"src/",
2725
"cjs/",
28-
"es/",
29-
"umd/",
3026
"types/",
3127
"index.js"
3228
],
3329
"publishConfig": {
3430
"access": "public"
3531
},
3632
"devDependencies": {
37-
"@rollup/plugin-json": "6.1.0",
38-
"@rollup/plugin-typescript": "12.3.0",
3933
"@tryghost/config-url-helpers": "^1.0.17",
4034
"@types/cheerio": "^0.22.31",
4135
"@types/lodash": "^4.14.202",
4236
"@types/node": "^20.0.0",
4337
"c8": "10.1.3",
4438
"mocha": "11.7.5",
4539
"rewire": "9.0.1",
46-
"rollup": "2.79.2",
47-
"rollup-plugin-commonjs": "10.1.0",
48-
"rollup-plugin-node-resolve": "5.2.0",
49-
"rollup-plugin-terser": "7.0.2",
5040
"should": "13.2.3",
5141
"sinon": "21.0.0",
42+
"ts-node": "10.9.2",
5243
"typescript": "5.9.3"
5344
},
5445
"dependencies": {

packages/url-utils/rollup.config.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

packages/url-utils/test/unit/url-utils.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require('../utils');
44
const assert = require('assert/strict');
55

66
const sinon = require('sinon');
7-
const UrlUtils = require('../../cjs/UrlUtils');
7+
const UrlUtils = require('../../src/UrlUtils');
88
const configUrlHelpers = require('@tryghost/config-url-helpers');
99

1010
const constants = {

packages/url-utils/test/unit/utils/absolute-to-relative.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// const testUtils = require('./utils');
33
require('../../utils');
44

5-
const absoluteToRelative = require('../../../cjs/utils/absolute-to-relative');
5+
const absoluteToRelative = require('../../../src/utils/absolute-to-relative');
66

77
describe('utils: absoluteToRelative()', function () {
88
it('ignores relative URLs', function () {

packages/url-utils/test/unit/utils/absolute-to-transform-ready.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// const testUtils = require('./utils');
33
require('../../utils');
44

5-
const absoluteToTransformReady = require('../../../cjs/utils/absolute-to-transform-ready');
5+
const absoluteToTransformReady = require('../../../src/utils/absolute-to-transform-ready');
66

77
describe('utils: absoluteToTransformReady()', function () {
88
it('ignores relative URLs', function () {

packages/url-utils/test/unit/utils/deduplicate-double-slashes.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require('../../utils');
22

3-
const deduplicateDoubleSlashes = require('../../../cjs/utils/deduplicate-double-slashes');
3+
const deduplicateDoubleSlashes = require('../../../src/utils/deduplicate-double-slashes');
44

55
describe('utils: deduplicateDoubleSlashes()', function () {
66
it('should deduplicate double slashes in URL', function () {

packages/url-utils/test/unit/utils/deduplicate-subdirectory.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// const testUtils = require('./utils');
33
require('../../utils');
44

5-
const deduplicateSubdirectory = require('../../../cjs/utils/deduplicate-subdirectory');
5+
const deduplicateSubdirectory = require('../../../src/utils/deduplicate-subdirectory');
66

77
describe('utils: deduplicateSubdirectory()', function () {
88
describe('with url', function () {

packages/url-utils/test/unit/utils/html-absolute-to-relative.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require('../../utils');
55
const sinon = require('sinon');
66

77
const cheerio = require('cheerio');
8-
const htmlAbsoluteToRelative = require('../../../cjs/utils/html-absolute-to-relative');
8+
const htmlAbsoluteToRelative = require('../../../src/utils/html-absolute-to-relative');
99

1010
describe('utils: htmlAbsoluteToRelative()', function () {
1111
const siteUrl = 'http://my-ghost-blog.com';

packages/url-utils/test/unit/utils/html-absolute-to-transform-ready.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const rewire = require('rewire');
66
const sinon = require('sinon');
77

88
const cheerio = require('cheerio');
9-
const htmlTransform = rewire('../../../cjs/utils/html-transform');
10-
const htmlAbsoluteToTransformReady = require('../../../cjs/utils/html-absolute-to-transform-ready');
9+
const htmlTransform = rewire('../../../src/utils/html-transform');
10+
const htmlAbsoluteToTransformReady = require('../../../src/utils/html-absolute-to-transform-ready');
1111

1212
describe('utils: htmlAbsoluteToTransformReady()', function () {
1313
const siteUrl = 'http://my-ghost-blog.com';

packages/url-utils/test/unit/utils/html-relative-to-absolute.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const sinon = require('sinon');
66
const rewire = require('rewire');
77

88
const cheerio = require('cheerio');
9-
const htmlTransform = rewire('../../../cjs/utils/html-transform');
10-
const htmlRelativeToAbsolute = require('../../../cjs/utils/html-relative-to-absolute');
9+
const htmlTransform = rewire('../../../src/utils/html-transform');
10+
const htmlRelativeToAbsolute = require('../../../src/utils/html-relative-to-absolute');
1111

1212
describe('utils: htmlRelativeToAbsolute()', function () {
1313
const siteUrl = 'http://my-ghost-blog.com';

0 commit comments

Comments
 (0)