A indie technical narrator of China. Aha! ๐
MAKE IT BETTER!
- Twitter: https://twitter.com/zceme
Weibo: https://weibo.com/zceme- Bilibili: https://space.bilibili.com/210242179
A simple yet powerful template-based Scaffolding tools.
Home Page: https://github.com/zce/caz
License: MIT License
A indie technical narrator of China. Aha! ๐
MAKE IT BETTER!
error [email protected]: The engine "node" is incompatible with this module. Expected version "^10.17.0". Got "14.7.0
error Found incompatible module.
ไธๅฎ่ฆๆnode ็ๆฌ้ๅฐ10.17ๅ
At present, all modules are imported directly using the import statement, such as:
import fs from 'fs'
import pkg from './package.json'
output code
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const package_1 = __importDefault(require("./package"));
__importDefault
is too redundant.
Maybe import = require() is a better choice for the commonjs module, such as:
import fs = require('fs')
export const contents = fs.readFileSync(...)
output code
var fs_1 = require("./fs");
exports.contents = fs_1.readFileSync(...)
ref:
At present, only the necessary information is output in the console, and there is no log for each work link, which is extremely unfriendly for users.
Appropriate log output for key steps.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository. View logs.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@commitlint/cli
, @commitlint/config-conventional
)@types/jest
, jest
, ts-jest
)ini
, @types/ini
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/main.yml
actions/checkout v2
actions/setup-node v2
actions/checkout v2
actions/setup-node v2
actions/checkout v2
actions/setup-node v2
package.json
adm-zip ^0.5.5
cac ^6.7.3
env-paths ^2.2.1
fast-glob ^3.2.7
ini ^2.0.0
lodash ^4.17.21
node-fetch ^2.6.1
ora ^5.4.1
prompts ^2.4.1
semver ^7.3.5
validate-npm-package-name ^3.0.0
@commitlint/cli 12.1.4
@commitlint/config-conventional 12.1.4
@types/adm-zip 0.4.34
@types/ini 1.3.30
@types/jest 26.0.24
@types/lodash 4.14.171
@types/node 16.3.2
@types/node-fetch 2.5.12
@types/prompts 2.0.14
@types/semver 7.3.7
@types/validate-npm-package-name 3.0.3
copyfiles 2.4.1
husky 7.0.1
jest 27.0.6
lint-staged 11.1.0
rimraf 3.0.2
ts-jest 27.0.4
ts-standard 10.0.0
typescript 4.3.5
node >=10.12
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option 'packageRules[2].node' should be a json object, Invalid configuration option: author, Invalid configuration option: bin, Invalid configuration option: bugs, Invalid configuration option: commitlint, Invalid configuration option: files, Invalid configuration option: homepage, Invalid configuration option: jest, Invalid configuration option: keywords, Invalid configuration option: license, Invalid configuration option: lint-staged, Invalid configuration option: main, Invalid configuration option: name, Invalid configuration option: packageRules[0].adm-zip, Invalid configuration option: packageRules[0].cac, Invalid configuration option: packageRules[0].env-paths, Invalid configuration option: packageRules[0].fast-glob, Invalid configuration option: packageRules[0].ini, Invalid configuration option: packageRules[0].lodash, Invalid configuration option: packageRules[0].node-fetch, Invalid configuration option: packageRules[0].ora, Invalid configuration option: packageRules[0].prompts, Invalid configuration option: packageRules[0].semver, Invalid configuration option: packageRules[0].validate-npm-package-name, Invalid configuration option: packageRules[1].@commitlint/cli, Invalid configuration option: packageRules[1].@commitlint/config-conventional, Invalid configuration option: packageRules[1].@types/adm-zip, Invalid configuration option: packageRules[1].@types/ini, Invalid configuration option: packageRules[1].@types/jest, Invalid configuration option: packageRules[1].@types/lodash, Invalid configuration option: packageRules[1].@types/node, Invalid configuration option: packageRules[1].@types/node-fetch, Invalid configuration option: packageRules[1].@types/prompts, Invalid configuration option: packageRules[1].@types/semver, Invalid configuration option: packageRules[1].@types/validate-npm-package-name, Invalid configuration option: packageRules[1].copyfiles, Invalid configuration option: packageRules[1].husky, Invalid configuration option: packageRules[1].jest, Invalid configuration option: packageRules[1].lint-staged, Invalid configuration option: packageRules[1].rimraf, Invalid configuration option: packageRules[1].ts-jest, Invalid configuration option: packageRules[1].ts-standard, Invalid configuration option: packageRules[1].typescript, Invalid configuration option: publishConfig, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: types, Invalid configuration option: version, The "node" object can only be configured at the top level of a config but was found inside "packageRules[2]"
$ node -v
v12.20.1
$ npm -v
6.14.10
$ caz -v
caz/0.5.1 win32-x64 node-v12.20.1
$ git --version
git version 2.29.0.rc1.windows.1
โ Project name ... my-project
โ Project version ... 0.1.0
โ Project name ... my-project
โ Project version ... 0.1.0
โ Project description ... Awesome node modules.
โ Project author name ... changfan.xu
โ Project author email ... [email protected]
โ Project author url ... https://gitee.com/BaboonKing
โ Project license ยป MIT
โ GitHub username or organization ... baboon-king
โ Choose the features you need ยป Automatic test, TypeScript, CLI Program, Additional docs, Additional examples
โ Install dependencies ... yes
โ Package manager ยป npm
Unexpected token '}'
expected results
create success
actual results
create failed
and
get "Unexpected token '}'"
why?
https://github.com/zce/caz/blob/e3d783b4799e91d56125b8d59cadb92ee708f71e/src/init/render.ts#L7-L27
At present, it is decided whether to use the template engine to render the file based on whether the content of the file matches the /<%([\s\S]+?)%>/
.
However, some binary files may also contain such text, so it is not reliable to do so.
The correct approach should be to detect binary files separately.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.