Skip to content

Commit a244e76

Browse files
committed
setup repo
0 parents  commit a244e76

21 files changed

+3195
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,json,yml}]
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v2
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup PNPM
20+
uses: pnpm/[email protected]
21+
with:
22+
version: ^6.29.1
23+
24+
- name: Use Node
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: 17.x
28+
cache: 'pnpm'
29+
30+
- name: Setup NPM credentials
31+
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
34+
35+
- name: Install Dependencies
36+
run: pnpm install
37+
38+
- name: Create Release Pull Request or Publish to npm
39+
id: changesets
40+
uses: changesets/action@v1
41+
with:
42+
publish: pnpm release
43+
commit: 'chore(release): update monorepo packages versions'
44+
title: 'Upcoming Release Changes'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variable files
55+
.env*
56+
57+
# next files
58+
.next
59+
60+
# Mac files
61+
.DS_Store
62+
63+
# Yarn
64+
yarn-error.log
65+
.pnp/
66+
.pnp.js
67+
# Yarn Integrity file
68+
.yarn-integrity
69+
70+
# Built
71+
**/dist/**

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm pretty-quick

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/dist/**
2+
coverage/
3+
.pnp.*

.prettierrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"semi": false,
6+
"overrides": [
7+
{
8+
"files": ".prettierrc",
9+
"options": {
10+
"parser": "json"
11+
}
12+
}
13+
]
14+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"files.autoSave": "onFocusChange",
3+
"eslint.format.enable": true,
4+
"editor.formatOnSave": true,
5+
"editor.defaultFormatter": "esbenp.prettier-vscode"
6+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Saihajpreet Singh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Graph Local State
2+
3+
More info about this is coming soon!
4+
5+
Currently just playing around initial monorepo setup.
6+
7+
- [`pnpm`](https://pnpm.io/) to manage packages.
8+
- [`changesets`](https://github.com/changesets/changesets) for versioning and publishing.
9+
- [`bob`](https://github.com/kamilkisiela/bob) for bundling.
10+
- [`renovate`](https://www.whitesourcesoftware.com/free-developer-tools/renovate/) for automated dependency updates.

bob.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {}

package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "graph-local-state-monorepo",
3+
"private": true,
4+
"scripts": {
5+
"format": "prettier . --write",
6+
"check": "pnpm check -r",
7+
"prebuild": "rimraf packages/*/dist",
8+
"build": "tsc --project tsconfig.build.json && bob build",
9+
"postinstall": "patch-package && husky install",
10+
"pretty-quick": "pretty-quick --staged",
11+
"release": "pnpm build && changeset publish"
12+
},
13+
"license": "MIT",
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/graphprotocol/graph-local-state"
17+
},
18+
"bugs": {
19+
"url": "https://github.com/graphprotocol/graph-local-state/issues"
20+
},
21+
"homepage": "https://github.com/graphprotocol/graph-local-state#readme",
22+
"contributors": [
23+
"Saihajpreet Singh <[email protected]> (https://saihaj.dev/)"
24+
],
25+
"engines": {
26+
"pnpm": ">=6.32.3"
27+
},
28+
"packageManager": "[email protected]",
29+
"devDependencies": {
30+
"@changesets/cli": "2.21.0",
31+
"@types/node": "^17.0.21",
32+
"bob-the-bundler": "^1.6.1",
33+
"husky": "^7.0.4",
34+
"patch-package": "^6.4.7",
35+
"prettier": "^2.5.1",
36+
"pretty-quick": "^3.1.3",
37+
"rimraf": "^3.0.2",
38+
"typescript": "^4.6.2"
39+
}
40+
}

patches/@changesets+cli+2.21.0.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/node_modules/@changesets/cli/dist/cli.cjs.dev.js b/node_modules/@changesets/cli/dist/cli.cjs.dev.js
2+
index e539f1b..14c6c05 100644
3+
--- a/node_modules/@changesets/cli/dist/cli.cjs.dev.js
4+
+++ b/node_modules/@changesets/cli/dist/cli.cjs.dev.js
5+
@@ -587,7 +587,7 @@ const getLastJsonObjectFromString = str => {
6+
return null;
7+
};
8+
9+
-const npmRequestLimit = pLimit__default['default'](40);
10+
+const npmRequestLimit = pLimit__default['default'](3);
11+
const npmPublishLimit = pLimit__default['default'](10);
12+
13+
function jsonParse(input) {
14+
diff --git a/node_modules/@changesets/cli/dist/cli.esm.js b/node_modules/@changesets/cli/dist/cli.esm.js
15+
index d1cf1fc..c25d64f 100644
16+
--- a/node_modules/@changesets/cli/dist/cli.esm.js
17+
+++ b/node_modules/@changesets/cli/dist/cli.esm.js
18+
@@ -565,7 +565,7 @@ const getLastJsonObjectFromString = str => {
19+
return null;
20+
};
21+
22+
-const npmRequestLimit = pLimit(40);
23+
+const npmRequestLimit = pLimit(3);
24+
const npmPublishLimit = pLimit(10);
25+
26+
function jsonParse(input) {

0 commit comments

Comments
 (0)