Skip to content

Commit 0bd3d1d

Browse files
authored
Merge pull request #33 from asnunes/refactor
Release v1.2.0
2 parents 41b19c6 + 96640da commit 0bd3d1d

File tree

106 files changed

+375
-334
lines changed

Some content is hidden

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

106 files changed

+375
-334
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ dist
33
coverage
44
./data
55
requirements
6-
.vscode
6+
.vscode
7+
*.jpeg

README.md

Lines changed: 5 additions & 8 deletions

jest.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
44
moduleDirectories: ['node_modules'],
5-
testMatch: ['<rootDir>/__tests__/**/*.test.ts'],
6-
unmockedModulePathPatterns: ['<rootDir>/node_modules/nock'],
5+
transform: {
6+
'.+\\.ts$': 'ts-jest',
7+
},
8+
testMatch: ['<rootDir>/src/**/*.(test|spec).ts'],
9+
moduleNameMapper: {
10+
'@/(.*)': '<rootDir>/src/$1',
11+
},
12+
collectCoverageFrom: ['src/**/*.ts', '!src/migrations/*.ts', '!src/server.ts', '!src/protocols/*.ts'],
13+
coverageProvider: 'babel',
14+
coverageDirectory: 'coverage',
15+
restoreMocks: true,
716
};

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "notion-page-to-html",
3-
"version": "1.1.4",
3+
"version": "1.2.0",
44
"description": "It converts public notion pages to html from url",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
8-
"build": "rm -rf ./dist && tsc",
9-
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
8+
"prebuild": "rm -rf ./dist",
9+
"build": "tsc -p tsconfig.build.json",
10+
"lint": "eslint '*/**/*.{js,ts}' --quiet --fix",
1011
"lint:staged": "lint-staged",
1112
"test": "jest --passWithNoTests --silent --noStackTrace --runInBand",
1213
"test:watch": "npm test -- --watch",

__tests__/mocks/blocks.ts renamed to src/__tests__/mocks/blocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Block, DecorableText, DecorationType, Decoration } from '../../src/data/protocols/blocks';
1+
import { Block, DecorableText, DecorationType, Decoration } from '../../data/protocols/blocks';
22

33
export const NO_TEXT = [
44
{
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/data/helpers/block-to-inner-html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Block, DecorableText } from '../protocols/blocks';
2-
import { Decorator } from '../usecases/blocks-to-html-converter/block-parsers/decorations/decorator';
2+
import { Decorator } from '../use-cases/blocks-to-html-converter/block-parsers/decorations/decorator';
33
import { replaceLineBreakByBrTag } from './replace-line-break-to-br-tag';
44

55
export const blockToInnerHtml = async (block: Block): Promise<string> => {

0 commit comments

Comments
 (0)