Skip to content
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

Lerna setup, and ESLint, Jest and TS configs refactored #293

Merged
merged 31 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fa7c713
Lerna setup, and ESLint, Jest and TS configs refactored
pmcb55 Sep 3, 2020
ab624e4
updates for CI, removed lint step due to copyright checking failures
pmcb55 Sep 3, 2020
e722707
use local Lerna in CI
pmcb55 Sep 3, 2020
cc9fe5c
add wildcard path for code coverage upload
pmcb55 Sep 3, 2020
74138c6
wildcards may need v2 of GitHub upload-artifact
pmcb55 Sep 3, 2020
7cb9427
attempting CD fixes now for Lerna
pmcb55 Sep 3, 2020
7b0a210
YAML typo on cd-preview
pmcb55 Sep 3, 2020
01989f1
still a YAML typo on cd-preview
pmcb55 Sep 3, 2020
9c34597
you need to add --yes for lerna version in CI
pmcb55 Sep 3, 2020
4f02809
typo in YAML (comment inside multi-line run command)
pmcb55 Sep 3, 2020
5a80022
docs build folders added to .gitignore
pmcb55 Sep 4, 2020
039ecdb
updates based on PR feedback
pmcb55 Sep 4, 2020
8d3f7f4
use explicit version for GitHub upload-artifact
pmcb55 Sep 4, 2020
534d684
v0.0.1-featsetup-lerna-239690977-669.0
Sep 4, 2020
8a569fc
moved lerna bootstrap before lerna version
pmcb55 Sep 4, 2020
76a4d6e
cannot use backslashes to refer to local Lerna on windows
pmcb55 Sep 4, 2020
fd15cff
v0.0.1-featsetup-lerna-239757947-671.0
Sep 4, 2020
497428f
was missing -- on npm script for version
pmcb55 Sep 4, 2020
06e7742
v0.0.1-featsetup-lerna-239785047-673.0
Sep 4, 2020
478c2f7
Prevent Lerna from pushing prerelease tags
NSeydoux Sep 4, 2020
ea01895
v0.0.1-featsetup-lerna-239799074-675.0
Sep 4, 2020
b4b2662
Prevent learna from pushing prelease tag
NSeydoux Sep 4, 2020
962e834
Removed deprecated (and unused) Lerna skip-git option
NSeydoux Sep 7, 2020
65efca3
Force lerna to get version number from package.json
NSeydoux Sep 7, 2020
357aeb7
Added response to Lerna prompt on preview
NSeydoux Sep 7, 2020
f4d036e
v0.0.1-0.1.1-featsetup-lerna-000-000.000.0
NSeydoux Sep 7, 2020
7974c0a
Added confirmation to publish script
NSeydoux Sep 7, 2020
14fa359
Reverted `lerna.json`
NSeydoux Sep 7, 2020
a72505d
Prepared release CD script
NSeydoux Sep 7, 2020
3ac1135
Added confirmation flag for preview publication
NSeydoux Sep 7, 2020
bd382a8
remove linting from lint-staged
pmcb55 Sep 7, 2020
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 .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
resources/
resources/
node_modules/
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier", "license-header"],
extends: [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
rules: {
"prettier/prettier": "error",
"@typescript-eslint/interface-name-prefix": ["error", "always"],
"import/no-unresolved": 0,
"license-header/header": ["error", "../../resources/license-header.js"],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
};
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/cd-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
# Remove non-alphanumeric characters
# See https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "::set-env name=TAG_SLUG::$(echo ${GITHUB_REF#refs/heads/} | tr -cd '[:alnum:]-')"
- run: npm ci
- name: Prepare prerelease version
run: |
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
# Make sure the prerelease is tagged with the branch name, and that they are sorted by build:
npm version prerelease --preid=$TAG_SLUG-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER
- run: npm ci
npm run version -- prerelease --preid=$TAG_SLUG-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER --yes --no-push
- run: npm run build
- run: npm publish --tag "$TAG_SLUG"
- run: npm run publish-preview -- --dist-tag "$TAG_SLUG" --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: |
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: CD-release

on:
push:
Expand Down Expand Up @@ -55,11 +55,19 @@ jobs:
registry-url: "https://registry.npmjs.org"
- run: npm ci
- name: Publish to npm
# If you want a package to be public (e.g. you'd expect
# `npm publish --access public` here), then just add this to the relevant
# `package.json` file:
# {
# "publishConfig": {
# "access": "public"
# }
# }
run: |
npm publish --access public
echo "Package published. To install, run:"
npm run publish -- --yes
echo "Packages published. To install, run:"
echo ""
echo " npm install @inrupt/solid-client-authn-browser"
echo " npm install @inrupt/solid-client-authn-XXXX"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Mark GitHub Deployment as successful
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ jobs:
path: node_modules
key: ${{ runner.os }}-node${{ runner.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run bootstrap -- --ci
- run: npm run build
- run: npm test
- run: npx prettier --check "{src,__tests__}/**"
- run: npm run test
- run: npx prettier --check "{packages/*/src,packages/*/__tests__}/**"
- run: npm audit --audit-level=moderate
- name: Archive code coverage results
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v2.1.4
with:
name: code-coverage-report
path: coverage
path: ./packages/*/coverage/
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ lerna-debug.log
packages/*/lib

# Documentation
docs/prose/build/
docs/api/build/
docs/api/source/api/
docs/dist/
packages/**/docs/prose/build/
packages/**/docs/api/build/
packages/**/docs/api/source/api/
packages/**/docs/dist/
22 changes: 2 additions & 20 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
# Changelog

This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### New features

## [0.1.1] - 2020-08-14

### Bugfixes

- The code wasn't shipped properly when publishing a non-dev release to NPMJS.

## [0.1.0] - 2020-08-10

### New features

First release! What's possible with this first release:

- Authenticate a Web app to a Solid Identity provider
- Perform an authenticated fetch to a Pod Server, using a DPoP token
This change log is intended to record changes made across all packages contained
within this mono-repo.
13 changes: 13 additions & 0 deletions NOTICE-TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
###############################################################################
#
# This file is intended as a template, to be copied to contained packages and
# edited as appropriate for that particular package (including deleting this
# template pre-amble!), and renamed to remove the '-TEMPLATE' suffix.
#
###############################################################################

Inrupt `solid-client-authn-XXXX`
Copyright 2020 Inrupt Inc.

This product includes software developed at
Inrupt Inc. (https://inrupt.com/).
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = {
"^.+\\.(ts|tsx)?$": "ts-jest",
},
collectCoverageFrom: [
"src/**/*.ts",
"**/src/**/*.ts",
"!**/node_modules/**",
"!**/__tests__/**",
"!src/external-types/**",
"!src/index.ts",
"!**/src/external-types/**",
"!**/src/index.ts",
],
};
4 changes: 4 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"packages": ["packages/*"],
"version": "0.1.1"
}
Loading