Skip to content

Commit 8db0b8c

Browse files
Monorepo (#190)
* Update to MSAL version 1.2.0 and fix breaking changes * MIgrate to Lerna monorepo with Yarn workspaces and Babel to replace TypeScript compiler * Modify the gihub issue tempaltes to take the library version numbers * Add the library into the packages/ folder * Upgrade sample to latest version of create-react-app * Enable lint-staged on the library package * Add a build script to the monorepo root to simplify pipelines * MOve the README to the project root * Fix unit tests
1 parent 255fba5 commit 8db0b8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+33565
-35350
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE M
2424
### OS and Version?
2525
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
2626
27-
### Versions
28-
>
27+
### Library versions
28+
- `react-aad-msal`: [e.g. version number]
29+
- `msal`: [e.g. version number]
2930

3031
### Mention any other details that might be useful
3132

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ assignees: ''
77

88
---
99

10+
**Library versions**
11+
- `react-aad-msal`: [e.g. version number]
12+
- `msal`: [e.g. version number]
13+
1014
**Describe the bug**
1115
A clear and concise description of what the bug is.
1216

17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
1321
**To Reproduce**
1422
Steps to reproduce the behavior:
1523
1. Go to '...'
1624
2. Click on '....'
1725
3. Scroll down to '....'
1826
4. See error
1927

20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
22-
23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
25-
2628
**Desktop (please complete the following information):**
2729
- OS: [e.g. iOS]
2830
- Browser [e.g. chrome, safari]
@@ -34,5 +36,3 @@ If applicable, add screenshots to help explain your problem.
3436
- Browser [e.g. stock browser, safari]
3537
- Version [e.g. 22]
3638

37-
**Additional context**
38-
Add any other context about the problem here.

.gitignore

Lines changed: 248 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,257 @@
1-
# See https://help.github.com/ignore-files/ for more about ignoring files.
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
23

3-
# dependencies
4-
**/node_modules
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
59

6-
# testing
7-
/coverage
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
812

9-
# production
10-
/dist
11-
/lib
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
bld/
21+
[Bb]in/
22+
[Oo]bj/
23+
[Ll]og/
1224

13-
# misc
14-
.DS_Store
15-
.env.local
16-
.env.development.local
17-
.env.test.local
18-
.env.production.local
25+
# Visual Studio 2015 cache/options directory
26+
.vs/
27+
# Uncomment if you have tasks that create the project's static files in wwwroot
28+
#wwwroot/
1929

20-
npm-debug.log*
21-
yarn-debug.log*
22-
yarn-error.log*
30+
# MSTest test Results
31+
[Tt]est[Rr]esult*/
32+
[Bb]uild[Ll]og.*
2333

24-
# build
25-
/build
26-
/sample/build/
34+
# NUNIT
35+
*.VisualState.xml
36+
TestResult.xml
2737

28-
# env file
29-
.env
38+
# Build Results of an ATL Project
39+
[Dd]ebugPS/
40+
[Rr]eleasePS/
41+
dlldata.c
3042

31-
# intellij config
32-
.idea
43+
# DNX
44+
project.lock.json
45+
artifacts/
3346

47+
*_i.c
48+
*_p.c
49+
*_i.h
50+
*.ilk
51+
*.meta
52+
*.obj
53+
*.pch
54+
*.pdb
55+
*.pgc
56+
*.pgd
57+
*.rsp
58+
*.sbr
59+
*.tlb
60+
*.tli
61+
*.tlh
62+
*.tmp
63+
*.tmp_proj
64+
*.log
65+
*.vspscc
66+
*.vssscc
67+
.builds
68+
*.pidb
69+
*.svclog
70+
*.scc
71+
72+
# Chutzpah Test files
73+
_Chutzpah*
74+
75+
# Visual C++ cache files
76+
ipch/
77+
*.aps
78+
*.ncb
79+
*.opendb
80+
*.opensdf
81+
*.sdf
82+
*.cachefile
83+
*.VC.db
84+
*.VC.VC.opendb
85+
86+
# Visual Studio profiler
87+
*.psess
88+
*.vsp
89+
*.vspx
90+
*.sap
91+
92+
# TFS 2012 Local Workspace
93+
$tf/
94+
95+
# Guidance Automation Toolkit
96+
*.gpState
97+
98+
# ReSharper is a .NET coding add-in
99+
_ReSharper*/
100+
*.[Rr]e[Ss]harper
101+
*.DotSettings.user
102+
103+
# JustCode is a .NET coding add-in
104+
.JustCode
105+
106+
# TeamCity is a build add-in
107+
_TeamCity*
108+
109+
# DotCover is a Code Coverage Tool
110+
*.dotCover
111+
112+
# NCrunch
113+
_NCrunch_*
114+
.*crunch*.local.xml
115+
nCrunchTemp_*
116+
117+
# MightyMoose
118+
*.mm.*
119+
AutoTest.Net/
120+
121+
# Web workbench (sass)
122+
.sass-cache/
123+
124+
# Installshield output folder
125+
[Ee]xpress/
126+
127+
# DocProject is a documentation generator add-in
128+
DocProject/buildhelp/
129+
DocProject/Help/*.HxT
130+
DocProject/Help/*.HxC
131+
DocProject/Help/*.hhc
132+
DocProject/Help/*.hhk
133+
DocProject/Help/*.hhp
134+
DocProject/Help/Html2
135+
DocProject/Help/html
136+
137+
# Click-Once directory
138+
publish/
139+
140+
# Publish Web Output
141+
*.[Pp]ublish.xml
142+
*.azurePubxml
143+
# TODO: Comment the next line if you want to checkin your web deploy settings
144+
# but database connection strings (with potential passwords) will be unencrypted
145+
*.pubxml
146+
*.publishproj
147+
148+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
149+
# checkin your Azure Web App publish settings, but sensitive information contained
150+
# in these scripts will be unencrypted
151+
PublishScripts/
152+
153+
# NuGet Packages
154+
*.nupkg
155+
# The packages folder can be ignored because of Package Restore
156+
**/packages/*
157+
# except build/, which is used as an MSBuild target.
158+
!**/packages/build/
159+
# Uncomment if necessary however generally it will be regenerated when needed
160+
#!**/packages/repositories.config
161+
# NuGet v3's project.json files produces more ignoreable files
162+
*.nuget.props
163+
*.nuget.targets
164+
165+
# Microsoft Azure Build Output
166+
csx/
167+
*.build.csdef
168+
169+
# Microsoft Azure Emulator
170+
ecf/
171+
rcf/
172+
173+
# Windows Store app package directories and files
174+
AppPackages/
175+
BundleArtifacts/
176+
Package.StoreAssociation.xml
177+
_pkginfo.txt
178+
179+
# Visual Studio cache files
180+
# files ending in .cache can be ignored
181+
*.[Cc]ache
182+
# but keep track of directories ending in .cache
183+
!*.[Cc]ache/
184+
185+
# Others
186+
ClientBin/
187+
~$*
188+
*~
189+
*.dbmdl
190+
*.dbproj.schemaview
191+
*.pfx
192+
*.publishsettings
193+
node_modules/
194+
orleans.codegen.cs
195+
196+
# Since there are multiple workflows, uncomment next line to ignore bower_components
197+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
198+
#bower_components/
199+
200+
# RIA/Silverlight projects
201+
Generated_Code/
202+
203+
# Backup & report files from converting an old project file
204+
# to a newer Visual Studio version. Backup files are not needed,
205+
# because we have git ;-)
206+
_UpgradeReport_Files/
207+
Backup*/
208+
UpgradeLog*.XML
209+
UpgradeLog*.htm
210+
211+
# SQL Server files
212+
*.mdf
213+
*.ldf
214+
215+
# Business Intelligence projects
216+
*.rdl.data
217+
*.bim.layout
218+
*.bim_*.settings
219+
220+
# Microsoft Fakes
221+
FakesAssemblies/
222+
223+
# GhostDoc plugin setting file
224+
*.GhostDoc.xml
225+
226+
# Node.js Tools for Visual Studio
227+
.ntvs_analysis.dat
228+
229+
# Visual Studio 6 build log
230+
*.plg
231+
232+
# Visual Studio 6 workspace options file
233+
*.opt
234+
235+
# Visual Studio LightSwitch build output
236+
**/*.HTMLClient/GeneratedArtifacts
237+
**/*.DesktopClient/GeneratedArtifacts
238+
**/*.DesktopClient/ModelManifest.xml
239+
**/*.Server/GeneratedArtifacts
240+
**/*.Server/ModelManifest.xml
241+
_Pvt_Extensions
242+
243+
# Paket dependency manager
244+
.paket/paket.exe
245+
paket-files/
246+
247+
# FAKE - F# Make
248+
.fake/
249+
250+
# JetBrains Rider
251+
.idea/
252+
*.sln.iml
253+
254+
# Library specific ignore files
255+
node_modules/
256+
*.tgz
257+
*.zip

.npmignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@
2020
"editor.defaultFormatter": "esbenp.prettier-vscode",
2121
"editor.formatOnSave": true
2222
},
23-
"eslint.autoFixOnSave": true,
23+
"editor.codeActionsOnSave": {
24+
"source.fixAll.eslint": true
25+
},
2426
"eslint.validate": [
27+
"html",
2528
"javascript",
29+
"typescript",
2630
"javascriptreact",
27-
{
28-
"autoFix": true,
29-
"language": "typescript"
30-
},
31-
{
32-
"autoFix": true,
33-
"language": "typescriptreact"
34-
}
35-
]
31+
"typescriptreact"
32+
],
33+
"eslint.workingDirectories": [
34+
{"pattern": "./packages/*/"},
35+
{"pattern": "./samples/*/"}
36+
],
3637
}

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"packages": ["packages/*", "samples/*"],
3+
"npmClient": "yarn",
4+
"useWorkspaces": true,
5+
"version": "independent"
6+
}

0 commit comments

Comments
 (0)