Skip to content

pnpm #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged

pnpm #49

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
2 changes: 2 additions & 0 deletions boilerplates/pnpm-workspace/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js text eol=lf
33 changes: 33 additions & 0 deletions boilerplates/pnpm-workspace/.github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: run tests
on:
push:
workflow_dispatch:

jobs:
container-job:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm build

- name: Run tests for jsonld
run: cd ./packages/jsonld && pnpm test
107 changes: 107 additions & 0 deletions boilerplates/pnpm-workspace/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Dependencies
node_modules/
**/node_modules/

# Build outputs
dist/
build/
packages/**/dist/
packages/**/build/
*.tsbuildinfo

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
public

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

# Editor directories and files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# TypeScript
*.tsbuildinfo

# Testing
coverage/
.nyc_output/

# Misc
*.tgz
*.tar.gz
37 changes: 37 additions & 0 deletions boilerplates/pnpm-workspace/.questions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"name": "__USERFULLNAME__",
"message": "Enter author full name",
"required": true
},
{
"name": "__USEREMAIL__",
"message": "Enter author email",
"required": true
},
{
"name": "__MODULENAME__",
"message": "Enter the workspace name",
"required": true
},
{
"name": "__MODULEDESC__",
"message": "Enter the workspace description",
"required": true
},
{
"name": "__USERNAME__",
"message": "Enter your github username",
"required": true
},
{
"name": "__ACCESS__",
"message": "Module access?",
"choices": [
"public",
"restricted"
],
"type": "list",
"required": true
}
]
16 changes: 16 additions & 0 deletions boilerplates/pnpm-workspace/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"editor.formatOnSave": true,
"[javascriptreact]": {
"editor.formatOnSave": false
},
"[javascript]": {
"editor.formatOnSave": false
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
"javascriptreact"
]
}
21 changes: 21 additions & 0 deletions boilerplates/pnpm-workspace/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2025 Dan Lynch <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions boilerplates/pnpm-workspace/PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## publishing

```sh
pnpm dlx lerna version patch
pnpm build
pnpm -r publish
```
4 changes: 4 additions & 0 deletions boilerplates/pnpm-workspace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# __MODULENAME__

__MODULEDESC__

18 changes: 18 additions & 0 deletions boilerplates/pnpm-workspace/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
babelConfig: false,
tsconfig: "tsconfig.json",
},
],
},
transformIgnorePatterns: [`/node_modules/*`],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePathIgnorePatterns: ["dist/*"]
};
5 changes: 5 additions & 0 deletions boilerplates/pnpm-workspace/lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"npmClient": "pnpm"
}
27 changes: 27 additions & 0 deletions boilerplates/pnpm-workspace/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "__MODULENAME__-workspace",
"version": "0.0.1",
"private": true,
"scripts": {
"build": "lerna run build"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/node": "^20.0.0",
"copyfiles": "^2.4.1",
"jest": "^29.7.0",
"lerna": "^8.2.3",
"prettier": "^3.0.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.2.0"
},
"workspaces": [
"packages/*"
],
"repository": {
"type": "git",
"url": "https://github.com/__USERNAME__/__MODULENAME__"
}
}
48 changes: 48 additions & 0 deletions boilerplates/pnpm-workspace/packages/__MODULENAME__/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# dist
main
module

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Editors
.idea

# Lib
lib

# npm package lock
package-lock.json
yarn.lock

# others
.DS_Store
Loading
Loading