Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ node_modules
out
dist
*.tgz
coverage
package-lock.json
yarn.lock
pnpm-lock.yaml
deno.lock
deno.lock
1 change: 1 addition & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"semi": false,
"useTabs": true,
"objectWrap": "collapse",
"experimentalSortImports": {
"groups": [
"type-import",
Expand Down
11 changes: 6 additions & 5 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
"typescript/restrict-template-expressions": "off",
"import/no-duplicates": "error",
"import/no-cycle": "error",
"typescript/dot-notation": "error",
"object-shorthand": "error",
"oxc/no-map-spread": "error",
"oxc/no-accumulating-spread": "error",
"typescript/require-array-sort-compare": "off",
"unicorn/prefer-array-index-of": "error",
"unicorn/no-useless-iterator-to-array": "error",
"unicorn/no-new-array": "off",
"unicorn/prefer-ternary": "error",
"unicorn/prefer-logical-operator-over-ternary": "error",
"eslint/prefer-destructuring": "error",
"eslint/func-names": ["error", "always"],

"check-access": "warn"
"check-access": "error"
},
"categories": {
"perf": "error"
}
"categories": { "perf": "error" }
}
28 changes: 6 additions & 22 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
{
"$schema": "https://unpkg.com/release-it@21/schema/release-it.json",
"hooks": {
"before:init": "bun prerelease"
},
"plugins": {
"@release-it/keep-a-changelog": {
"filename": "CHANGELOG.md"
}
},
"github": {
"release": true,
"draft": false,
"releaseName": "${version}",
"skipChecks": true
},
"npm": {
"publish": true,
"skipChecks": true
},
"git": {
"requireBranch": false
}
"$schema": "https://unpkg.com/release-it@19/schema/release-it.json",
"hooks": { "before:init": "bun prerelease" },
"plugins": { "@release-it/keep-a-changelog": { "filename": "CHANGELOG.md" } },
"github": { "release": true, "draft": false, "releaseName": "${version}", "skipChecks": true },
"npm": { "publish": true, "skipChecks": true },
"git": { "requireBranch": false }
}
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"recommendations": ["oxc.oxc-vscode"]
}
{ "recommendations": ["oxc.oxc-vscode", "typescriptteam.native-preview"] }
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"js/ts.format.enabled": false,
"javascript.format.enable": false,
"typescript.format.enable": false,
"files.eol": "\n",
"js/ts.tsdk.path": "node_modules/typescript/lib",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "oxc.oxc-vscode"
}
75 changes: 0 additions & 75 deletions .vscode/tasks.json

This file was deleted.

215 changes: 107 additions & 108 deletions bun.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
"prerelease": "bun check && bun run test && bun run prod && bun run lint && bun run fmt --check && bun run ts-compat && bun run node-compat && bun publint --pack npm --strict",
"check": "bun tsc -p src --noEmit",
"dev": "bun tsc -p src",
"prod": "rm -rf out && bun tsc -p src/tsconfig.prod.json --emitDeclarationOnly && bun tsc -p src/tsconfig.prod.json --removeComments -d false && oxfmt ./out/**/*.js ./out/**/*.d.ts",
"prod": "rm -rf out && bun tsc -p src/tsconfig.prod.json --emitDeclarationOnly && bun tsc -p src/tsconfig.prod.json --removeComments -d false && oxfmt --no-error-on-unmatched-pattern ./out/**/*.js ./out/**/*.d.ts",
"lint": "bun run oxlint --type-aware",
"fmt": "bun run oxfmt",
"test": "bun test --timeout 5000 src",
"publint": "publint",
"node-compat": "bun run node-compat-22 && bun run node-compat-24",
"node-compat": "bun node-compat-22 && bun node-compat-24",
"ts-compat": "bun run ts-compat-6 && bun run ts-compat-5",
"node-compat-24": "node node_modules/typescript6/bin/tsc -p src/tsconfig.prod24.json --noEmit",
"node-compat-22": "node node_modules/typescript6/bin/tsc -p src/tsconfig.prod22.json --noEmit",
"ts-compat-5": "node node_modules/typescript5/bin/tsc -p src/tsconfig.prod.json --noEmit --resolveJsonModule",
"ts-compat-6": "node node_modules/typescript6/bin/tsc -p src/tsconfig.prod.json --noEmit",
"node-compat-24": "bun node_modules/typescript6/bin/tsc -p src/tsconfig.prod24.json --noEmit",
"node-compat-22": "bun node_modules/typescript6/bin/tsc -p src/tsconfig.prod22.json --noEmit",
"ts-compat-5": "bun node_modules/typescript5/bin/tsc -p src/tsconfig.prod.json --noEmit --resolveJsonModule",
"ts-compat-6": "bun node_modules/typescript6/bin/tsc -p src/tsconfig.prod.json --noEmit",
"release:major": "bun run --bun release-it --increment=major",
"release:minor": "bun run --bun release-it --increment=minor",
"release:patch": "bun run --bun release-it --increment=patch"
Expand Down
9 changes: 2 additions & 7 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe("@view-ignored/create generator", () => {
"CHANGELOG.md",
".vscode/extensions.json",
".vscode/settings.json",
".vscode/tasks.json",
".github/workflows/prerelease.yml",
".github/workflows/release.yml",
]
Expand Down Expand Up @@ -89,17 +88,13 @@ describe("@view-ignored/create generator", () => {
const indexTs = readFileSync(join(targetDir, "src/index.ts"), "utf8")
expect(indexTs).toContain("export function makeTesting()")
expect(indexTs).toContain(".testingignore")
}, 30000)
}, 60000)

test("creates target package without running bun install when install: false", () => {
const rootTmp = makeTmpDir()
const targetDir = join(rootTmp, "my-target")

const res = createTargetPackage({
install: false,
name: "awesome-tool",
targetDir,
})
const res = createTargetPackage({ install: false, name: "awesome-tool", targetDir })
expect(res.packageName).toBe("@view-ignored/target-awesome-tool")
expect(res.functionName).toBe("makeAwesomeTool")
expect(existsSync(join(targetDir, "bun.lock"))).toBe(false)
Expand Down
Loading
Loading