@mrshmllw/campfire 1.0.1-crumbs-feature-adding-peer-dep.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,75 +1,51 @@
1
1
  # Campfire
2
2
 
3
- `campfire` is a collection internal configs, utils, and bits and pieces
3
+ Internal configs, utils, and tooling for Marshmallow projects.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- $ npm install -D @mrshmllw/campfire
8
+ npm install -D @mrshmllw/campfire
9
9
  ```
10
10
 
11
- ## Making changes
11
+ ## Configuration
12
12
 
13
- When making changes and creating PR's we use
14
- [semantic-releases](https://www.npmjs.com/package/semantic-release) which make
15
- use of [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/).
13
+ Import and use the pre-configured tools:
16
14
 
17
- So to ensure our CHANGELOG.md is updated automatically and gets the changes we
18
- have made, we just need to name our PR's following this convention (casing
19
- matters): e.g
15
+ ```javascript
16
+ // eslint.config.js
17
+ import { eslintConfig } from '@mrshmllw/campfire'
18
+ export default eslintConfig
20
19
 
21
- 1. patch - fix(OPTIONAL bugfix-reference): some bugfix
22
- 2. minor - feat(OPTIONAL feature-reference): some feature
23
- 3. major - BREAKING CHANGE: some breaking change
20
+ // prettier.config.js
21
+ import { prettierConfig } from '@mrshmllw/campfire'
22
+ export default prettierConfig
24
23
 
25
- ## Release
26
-
27
- Only the following branches are supported for release:
28
-
29
- - `main`
30
- - `feature/*`
31
- - `chore/*`
32
- - `fix/*`
33
-
34
- #### Preview
24
+ // commitlint.config.js
25
+ import { commitlintConfig } from '@mrshmllw/campfire'
26
+ export default commitlintConfig
35
27
 
36
- Before releasing, you may want to see the changes that will be included in the
37
- next version deployed on NPM, you can do so by:
28
+ // release.config.js
29
+ import { releaseConfig } from '@mrshmllw/campfire'
30
+ export default releaseConfig
38
31
 
39
- 1. Goto our
40
- [github workflows](https://github.com/marshmallow-insurance/campfire/actions)
41
- 2. Click `Preview Bump and Publish`
42
- 3. Press `Run workflow` and select the `main` branch.
43
- 4. Wait for the `Generate preview CHANGELOG.md` and look at the results!
44
-
45
- #### Releasing & Publishing
46
-
47
- When you're happy with your changes, you can release & publish your changes to
48
- NPM in one fell swoop by:
32
+ // lint-staged.config.js
33
+ import { lintStagedConfig } from '@mrshmllw/campfire'
34
+ export default lintStagedConfig
35
+ ```
49
36
 
50
- 1. Goto our
51
- [github workflows](https://github.com/marshmallow-insurance/campfire/actions)
52
- 2. Click `Bump and Publish`
53
- 3. Press `Run workflow` and select the `main` branch.
54
- 4. Wait for release!
37
+ ## Development
55
38
 
56
- > [!NOTE] this workflow will fail if the package version is already on the latest, so you dont have to worry about deploying the same changes multiple times.
39
+ Use [conventional commits](https://www.conventionalcommits.org/) for automatic changelog generation:
57
40
 
58
- > [!IMPORTANT] When re-using the release.config in other repos, you need to ensure that the package.json includes a repository URL.
41
+ - `fix: description` patch release
42
+ - `feat: description` → minor release
43
+ - `BREAKING CHANGE: description` → major release
59
44
 
60
- #### Pre-Releases
45
+ ## Release
61
46
 
62
- Not too different to your usual workflow!
47
+ Releases are handled via GitHub Actions on these branches:
48
+ - `main` - production releases
49
+ - `feature/*`, `chore/*`, `fix/*` - pre-releases
63
50
 
64
- 1. Checkout a new branch with the prefix
65
- `(feature|chore|fix)/<your-branch-name>` e.g. `feature/awesome-new-feature`
66
- 2. Open a PR and create your changes as normal using semantic-commits!
67
- 3. Goto our
68
- [github workflows](https://github.com/marshmallow-insurance/campfire/actions)
69
- 4. Click `Bump and Publish` or `Preview Bump and Publish`
70
- 5. Press `Run workflow` and select `<your-full-branch-name>` branch.
71
- 6. Wait for release!
72
- 7. This can be done multiple times and it will increment your pre-release
73
- package version!
74
- 8. When you're happy with the changes, simply squash and merge the PR and
75
- release `main`!
51
+ Use the "Bump and Publish" workflow in GitHub Actions to release.
@@ -1,5 +1,5 @@
1
1
  export default config;
2
- declare const config: (import("eslint").Linter.FlatConfig | {
2
+ declare const config: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
3
3
  files: string[];
4
4
  languageOptions: {
5
5
  parser: typeof tsParser;
@@ -0,0 +1,5 @@
1
+ export { default as commitlint } from './commitlint.config.js';
2
+ export { default as eslint } from './eslint.config.js';
3
+ export { default as lintStaged } from './lint-staged.config.js';
4
+ export { default as prettier } from './prettier.config.js';
5
+ export { default as release } from './release.config.js';
@@ -0,0 +1,5 @@
1
+ export { default as commitlint } from './commitlint.config.js';
2
+ export { default as eslint } from './eslint.config.js';
3
+ export { default as lintStaged } from './lint-staged.config.js';
4
+ export { default as prettier } from './prettier.config.js';
5
+ export { default as release } from './release.config.js';
@@ -46,6 +46,7 @@ const config = {
46
46
  {
47
47
  preset: 'angular',
48
48
  releaseRules: [
49
+ { breaking: true, release: 'major' },
49
50
  { type: 'feat', release: 'minor' },
50
51
  { type: 'fix', release: 'patch' },
51
52
  { type: 'docs', release: 'patch' },
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './configs/commitlint.config';
2
- export * from './configs/eslint.config';
3
- export * from './configs/lint-staged.config';
4
- export * from './configs/prettier.config';
5
- export * from './configs/release.config';
1
+ export { default as commitlintConfig } from './configs/commitlint.config.js';
2
+ export { default as eslintConfig } from './configs/eslint.config.js';
3
+ export { default as lintStagedConfig } from './configs/lint-staged.config.js';
4
+ export { default as prettierConfig } from './configs/prettier.config.js';
5
+ export { default as releaseConfig } from './configs/release.config.js';
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
- export * from './configs/commitlint.config';
2
- export * from './configs/eslint.config';
3
- export * from './configs/lint-staged.config';
4
- export * from './configs/prettier.config';
5
- export * from './configs/release.config';
1
+ export { default as commitlintConfig } from './configs/commitlint.config.js';
2
+ export { default as eslintConfig } from './configs/eslint.config.js';
3
+ export { default as lintStagedConfig } from './configs/lint-staged.config.js';
4
+ export { default as prettierConfig } from './configs/prettier.config.js';
5
+ export { default as releaseConfig } from './configs/release.config.js';
6
+ // Note: GitHub workflow templates are available in the workflows/ directory
7
+ // Copy them to your .github/workflows/ directory as needed
package/package.json CHANGED
@@ -1,15 +1,14 @@
1
1
  {
2
2
  "name": "@mrshmllw/campfire",
3
- "version": "1.0.1-crumbs-feature-adding-peer-dep.2",
3
+ "version": "1.1.0",
4
4
  "description": "Collection of toasty utils and configs used by Marshmallow Technology",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "type": "module",
7
- "files": [
8
- "dist"
9
- ],
10
8
  "scripts": {
11
9
  "clean": "rimraf ./dist",
12
- "test": "echo \"Error: There are no tests yet\"",
10
+ "test": "node --test",
11
+ "test:watch": "node --test --watch",
13
12
  "check-types": "tsc --noEmit",
14
13
  "build": "npm run clean && tsc --p tsconfig.build.json",
15
14
  "prepublishOnly": "npm run build",
@@ -17,32 +16,82 @@
17
16
  "pre-commit-lint": "npm run check-types && lint-staged",
18
17
  "commitlint": "commitlint --edit"
19
18
  },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./configs/*": {
25
+ "types": "./dist/configs/*.d.ts",
26
+ "import": "./dist/configs/*.js"
27
+ },
28
+ "./utils/*": {
29
+ "types": "./dist/utils/*.d.ts",
30
+ "import": "./dist/utils/*.js"
31
+ },
32
+ "./workflows/*": "./dist/workflows/*"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
20
37
  "dependencies": {
21
- "typescript": "^5.7.3"
38
+ "@commitlint/types": "^19.0.0",
39
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
40
+ "@typescript-eslint/parser": "^8.0.0",
41
+ "eslint-plugin-prettier": "^5.0.0",
42
+ "@semantic-release/changelog": "^6.0.0",
43
+ "@semantic-release/git": "^10.0.0",
44
+ "@semantic-release/github": "^11.0.0",
45
+ "@semantic-release/npm": "^12.0.0",
46
+ "conventional-changelog-conventionalcommits": "^9.0.0"
22
47
  },
23
48
  "peerDependencies": {
24
- "eslint": "^9.19.0",
25
- "prettier": "^3.4.2",
26
- "lint-staged": "^15.4.3"
49
+ "@commitlint/cli": "^19.0.0",
50
+ "eslint": "^9.0.0",
51
+ "husky": "^9.0.0",
52
+ "lint-staged": "^15.0.0 || ^16.0.0",
53
+ "prettier": "^3.0.0",
54
+ "semantic-release": "^24.0.0"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "@commitlint/cli": {
58
+ "optional": true
59
+ },
60
+ "eslint": {
61
+ "optional": true
62
+ },
63
+ "prettier": {
64
+ "optional": true
65
+ },
66
+ "husky": {
67
+ "optional": true
68
+ },
69
+ "lint-staged": {
70
+ "optional": true
71
+ },
72
+ "semantic-release": {
73
+ "optional": true
74
+ }
27
75
  },
28
76
  "devDependencies": {
29
- "@commitlint/cli": "^19.7.1",
30
- "@commitlint/types": "^19.5.0",
77
+ "@commitlint/cli": "^19.8.1",
78
+ "@commitlint/types": "^19.8.0",
31
79
  "@semantic-release/changelog": "^6.0.3",
32
80
  "@semantic-release/git": "^10.0.1",
33
- "@semantic-release/github": "^11.0.1",
81
+ "@semantic-release/github": "^11.0.3",
34
82
  "@semantic-release/npm": "^12.0.1",
35
- "@typescript-eslint/eslint-plugin": "^8.23.0",
36
- "@typescript-eslint/parser": "^8.23.0",
37
- "conventional-changelog-conventionalcommits": "^8.0.0",
38
- "eslint": "^9.19.0",
39
- "eslint-config-prettier": "^9.1.0",
40
- "eslint-plugin-prettier": "^5.2.3",
83
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
84
+ "@typescript-eslint/parser": "^8.33.0",
85
+ "conventional-changelog-conventionalcommits": "^9.0.0",
86
+ "eslint": "^9.28.0",
87
+ "eslint-config-prettier": "^10.1.5",
88
+ "eslint-plugin-prettier": "^5.4.1",
41
89
  "husky": "^9.1.7",
42
- "lint-staged": "^15.4.3",
43
- "prettier": "^3.4.2",
90
+ "lint-staged": "^16.1.0",
91
+ "prettier": "^3.5.3",
44
92
  "rimraf": "^6.0.1",
45
- "semantic-release": "^24.2.1"
93
+ "semantic-release": "^24.2.5",
94
+ "typescript": "^5.8.3"
46
95
  },
47
96
  "repository": {
48
97
  "type": "git",
File without changes
@@ -1 +0,0 @@
1
- "use strict";