GithubHelp home page GithubHelp logo

zce / caz-prev Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 25.0 420 KB

A simple yet powerful template-based Scaffolding tools.

Home Page: https://github.com/zce/caz

License: MIT License

JavaScript 0.06% TypeScript 99.74% Shell 0.20%
boilerplate caz productivity scaffold scaffolding zce

caz-prev's Introduction

caz-prev's People

Contributors

dependabot[bot] avatar renovate[bot] avatar zce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

caz-prev's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency typescript to v4.9.5
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update commitlint monorepo to v19 (major) (@commitlint/cli, @commitlint/config-conventional)
  • chore(deps): update dependency @types/node to v20
  • chore(deps): update dependency @types/validate-npm-package-name to v4
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency rimraf to v5
  • chore(deps): update dependency ts-standard to v12
  • chore(deps): update dependency typescript to v5
  • chore(deps): update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • fix(deps): update dependency env-paths to v3
  • fix(deps): update dependency ini to v4 (ini, @types/ini)
  • fix(deps): update dependency node-fetch to v3
  • fix(deps): update dependency ora to v8
  • fix(deps): update dependency validate-npm-package-name to v5
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

After pressing enter get a "Unexpected token '}'"

  1. my info
$ 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
  1. do?
โˆš 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 '}'
  1. expected results
    create success

  2. actual results
    create failed
    and
    get "Unexpected token '}'"

  3. why?

Print workflow log

Actual situation

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.

Expected results

Appropriate log output for key steps.

Binary file detection

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.

  1. Detection based on file extension: https://www.npmjs.com/package/is-binary-path
  2. Other methods of detecting binary files: https://stackoverflow.com/questions/10225399/check-if-a-file-is-binary-or-ascii-with-node-js

Refactor import CommonJS modules

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:

yarn global add caz error

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ๅ—

Action Required: Fix Renovate Configuration

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]"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.