Skip to content

Commit

Permalink
fix: path parse incorrect (#148)
Browse files Browse the repository at this point in the history
* fix: path parse incorrect

* chore(boi): release some boilerplate
  • Loading branch information
Cphayim committed Mar 19, 2024
1 parent 65c768d commit 403ed99
Show file tree
Hide file tree
Showing 55 changed files with 194 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .tpl/boi-package/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '{{PRESET}}'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
6 changes: 6 additions & 0 deletions manifest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @vrn-deco/boilerplate-manifest

## 1.2.18

### Patch Changes

- Fixed path parse incorrect in Windows

## 1.2.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion manifest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-manifest",
"version": "1.2.17",
"version": "1.2.18",
"description": "boilerplate manifest",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
6 changes: 4 additions & 2 deletions manifest/scripts/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* @Description: generate vrn-manifest.json
*/

import path from 'path'
import { fileURLToPath } from 'node:url'
import path from 'node:path'

import fs from 'fs-extra'
import { logger } from '@ombro/logger'
import { isMain } from '@ombro/is-main'
Expand All @@ -14,7 +16,7 @@ import { archivePackage, getAllBoilerplatePackage } from './utils'
import { httpBoilerplateArchive } from './http-boilerplate'
import { LangPriority, UNKNOWN_PRIORITY } from './config'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

if (isMain(import.meta)) {
const manifest = genManifest()
Expand Down
9 changes: 6 additions & 3 deletions manifest/scripts/http-boilerplate.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import path from 'path'
import { fileURLToPath } from 'node:url'
import path from 'node:path'

import fs from 'fs-extra'
import { execaCommandSync } from 'execa'
import { logger } from '@ombro/logger'

import type { Manifest, APIManifest, APIBoilerplate, Lang } from '@vrn-deco/boilerplate-protocol'
import { getAllBoilerplatePackage, type ScanPackage } from './utils'
import { logger } from '@ombro/logger'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

const RELEASE_DIR = path.join(__dirname, '..', 'release')
const IGNORE_LIST = [
Expand Down
6 changes: 4 additions & 2 deletions manifest/scripts/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import path from 'path'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import fs from 'fs-extra'
import { execaCommandSync } from 'execa'
import {
Expand All @@ -11,7 +13,7 @@ import {

import { recommendedLangs, deprecatedLangs } from './config'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

export interface ScanPackage {
name: string
Expand Down
7 changes: 4 additions & 3 deletions manifest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
* @Date: 2021-07-19 01:01:04
* @Description:
*/

import path from 'path'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import fs from 'fs-extra'

import type { Manifest } from '@vrn-deco/boilerplate-protocol'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const MANIFEST_FILE = path.resolve(__dirname, '..', 'vrn-manifest.json')

export function getManifest(): Manifest {
Expand Down
7 changes: 7 additions & 0 deletions packages/javascript/vue2-element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-javascript-vue2-element

## 2.2.23

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 2.2.22

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/javascript/vue2-element/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/vue2-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-javascript-vue2-element",
"version": "2.2.22",
"version": "2.2.23",
"description": "boilerplate javascript vue2 element",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/javascript/vue2-vant-h5plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-javascript-vue-vant-h5plus

## 2.2.23

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 2.2.22

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/javascript/vue2-vant-h5plus/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/vue2-vant-h5plus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-javascript-vue2-vant-h5plus",
"version": "2.2.22",
"version": "2.2.23",
"description": "boilerplate-javascript-vue2-vant-h5plus",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/javascript/vue2-vant/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-javascript-vue-vant

## 2.2.23

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 2.2.22

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/javascript/vue2-vant/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/vue2-vant/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-javascript-vue2-vant",
"version": "2.2.22",
"version": "2.2.23",
"description": "boilerplate-javascript-vue2-vant",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/python/flask-sqlalchemy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-python-flask-sqlalchemy

## 1.0.9

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-pip@0.0.7

## 1.0.8

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/python/flask-sqlalchemy/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-pip'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/python/flask-sqlalchemy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-python-flask-sqlalchemy",
"version": "1.0.8",
"version": "1.0.9",
"description": "boilerplate python flask sqlalchemy",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/rust/cargo-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-rust-cargo-base

## 1.0.4

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-base@1.3.4

## 1.0.3

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/rust/cargo-base/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-base'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/rust/cargo-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-rust-cargo-base",
"version": "1.0.3",
"version": "1.0.4",
"description": "boilerplate rust cargo base",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/rust/napi-rs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-rust-napi-rs

## 1.0.4

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-base@1.3.4

## 1.0.3

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/rust/napi-rs/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-base'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/rust/napi-rs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-rust-napi-rs",
"version": "1.0.3",
"version": "1.0.4",
"description": "boilerplate rust napi rs",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/typescript/electron-vue3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-typescript-electron-vue3

## 0.0.12

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 0.0.11

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/electron-vue3/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/electron-vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-typescript-electron-vue3",
"version": "0.0.11",
"version": "0.0.12",
"description": "boilerplate typescript electron vue3",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/typescript/monorepo-lerna-yarn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-typescript-monorepo-lerna-yarn

## 1.0.5

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 1.0.4

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/monorepo-lerna-yarn/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/monorepo-lerna-yarn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-typescript-monorepo-lerna-yarn",
"version": "1.0.4",
"version": "1.0.5",
"description": "boilerplate typescript monorepo lerna yarn workspace",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/typescript/monorepo-pnpm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-typescript-monorepo-pnpm

## 1.0.5

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 1.0.4

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/monorepo-pnpm/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/monorepo-pnpm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrn-deco/boilerplate-typescript-monorepo-pnpm",
"version": "1.0.4",
"version": "1.0.5",
"description": "boilerplate typescript monorepo pnpm workspace",
"author": "Cphayim <i@cphayim.me>",
"homepage": "https://github.com/vrn-deco/boilerplate#readme",
Expand Down
7 changes: 7 additions & 0 deletions packages/typescript/nest-typeorm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @vrn-deco/boilerplate-typescript-nest-typeorm

## 1.1.7

### Patch Changes

- Fixed path parse incorrect in Windows
- @vrn-deco/boilerplate-preset-npm@1.1.5

## 1.1.6

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/nest-typeorm/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { isMain, runner } from '@vrn-deco/boilerplate-preset-npm'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Here, you should install and execute a preset or implement your own installation logic
export default (opts) => {
Expand Down
Loading

0 comments on commit 403ed99

Please sign in to comment.