Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
fix: plain text transformer error
  • Loading branch information
SSen committed Nov 1, 2021
1 parent 0035145 commit 42680c7
Show file tree
Hide file tree
Showing 9 changed files with 623 additions and 539 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"@handbook/markdown-source-import": "^1.1.0",
"@ssen/eslint-config": "^2.0.1",
"@ssen/prettier-config": "^2.0.1",
"@types/eslint": "^7.2.13",
"@types/prettier": "^2.3.0",
"eslint": "^7.28.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"prettier": "^2.3.1"
"@types/eslint": "^7.28.2",
"@types/prettier": "^2.4.1",
"eslint": "^7.32.0",
"husky": "^7.0.4",
"lint-staged": "^11.2.6",
"prettier": "^2.4.1"
}
}
8 changes: 4 additions & 4 deletions packages/.packages.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://rocket-hangar.github.io/rocket-punch/schemas/packages.json",
"@ssen/*": {
"version": "3.0.0",
"tag": "latest"
"version": "3.0.2-alpha.1",
"tag": "canary"
},
"rocket-punch": {
"version": "3.0.1",
"tag": "latest",
"version": "3.0.2-alpha.1",
"tag": "canary",
"packageJson": {
"bin": {
"rocket-punch": "./bin/rocket-punch.js"
Expand Down
58 changes: 29 additions & 29 deletions packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,45 @@
]
},
"devDependencies": {
"@babel/core": "^7.14.5",
"@babel/core": "^7.16.0",
"@svgr/plugin-jsx": "^5.5.0",
"@types/babel__core": "^7.1.14",
"@types/fs-extra": "^9.0.11",
"@types/glob": "^7.1.3",
"@types/jest": "^26.0.23",
"@types/js-yaml": "^4.0.1",
"@types/node": "^15.12.2",
"@types/node-fetch": "^2.5.10",
"@types/prettier": "^2.3.0",
"@types/prompts": "^2.4.0",
"@types/react": "^17.0.11",
"@types/rimraf": "^3.0.0",
"@types/semver": "^7.3.6",
"@types/tmp": "^0.2.0",
"@types/babel__core": "^7.1.16",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/jest": "^26.0.24",
"@types/js-yaml": "^4.0.4",
"@types/node": "^16.11.6",
"@types/node-fetch": "^3.0.3",
"@types/prettier": "^2.4.1",
"@types/prompts": "^2.0.14",
"@types/react": "^17.0.33",
"@types/rimraf": "^3.0.2",
"@types/semver": "^7.3.9",
"@types/tmp": "^0.2.2",
"@types/toposort": "^2.0.3",
"@types/yargs": "^17.0.0",
"chalk": "^4.1.1",
"depcheck": "^1.4.1",
"@types/yargs": "^17.0.5",
"chalk": "^4.1.2",
"depcheck": "^1.4.2",
"fs-extra": "^10.0.0",
"glob": "^7.1.7",
"glob": "^7.2.0",
"jest": "^26.6.3",
"js-yaml": "^4.1.0",
"lint-staged": "^11.0.0",
"mini-svg-data-uri": "^1.3.3",
"node-fetch": "^2.6.1",
"package-json": "^6.5.0",
"prettier": "^2.3.1",
"prompts": "^2.4.1",
"lint-staged": "^11.2.6",
"mini-svg-data-uri": "^1.4.3",
"node-fetch": "^3.0.0",
"package-json": "^7.0.0",
"prettier": "^2.4.1",
"prompts": "^2.4.2",
"react": "^17.0.2",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tmp": "^0.2.1",
"toposort": "^2.0.2",
"ts-jest": "^26.5.6",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.9.0",
"type-fest": "^1.2.0",
"typescript": "^4.3.2",
"yargs": "^17.0.1"
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.11.0",
"type-fest": "^2.5.2",
"typescript": "^4.4.4",
"yargs": "^17.2.1"
}
}
4 changes: 1 addition & 3 deletions packages/src/@ssen/jest-transform/transform/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ function getCacheKey(
}

function process(sourceText: string): string {
const result: object | number | string | null | undefined = yaml.load(
sourceText,
);
const result = yaml.load(sourceText);
const json: string = JSON.stringify(result, undefined, '\t');
return `module.exports = ${json}`;
}
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/src/@ssen/transform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Transformer {
export const plainTextTransformer: Transformer = {
getSourceText: () => (file: string) => {
const content: string = fs.readFileSync(file, 'utf8');
return `export default '${content}'`;
return `export default ${JSON.stringify(content)}`;
},
};

Expand Down
6 changes: 2 additions & 4 deletions packages/src/rocket-punch/entry/readEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export function readEntry({
},
);

const content: object | number | string | null | undefined = yaml.load(
source,
);
const content = yaml.load(source);

if (
!content ||
Expand All @@ -35,7 +33,7 @@ export function readEntry({
throw new Error(`yaml.safeLoad does not return an object`);
}

packages = content;
packages = content as object;
}

if (!packages) {
Expand Down
2 changes: 1 addition & 1 deletion tools/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
},
"bin": "./bin/rocket-punch-init.js",
"dependencies": {
"package-json": "^6.5.0"
"package-json": "^7.0.0"
}
}
Loading

0 comments on commit 42680c7

Please sign in to comment.