-
Notifications
You must be signed in to change notification settings - Fork 232
Set user agent for Angular, React, Vue libs - plus Jest #151
Conversation
Uses the new property in AuthJS to append the framework lib to the user agent Also adds unit testing via Jest for React, Vue Angular not yet tested, will add a "unit" test to app.component.spec.ts after #143 lands in master
packages/okta-vue/package.json
Outdated
"prestart": "npm run build", | ||
"pretest": "npm run build && npm run build:harness", | ||
"prepublish": "npm run build", | ||
"test": "npm run --prefix test/e2e/harness/ test", | ||
"jest": "jest src/", | ||
"test": "npm run jest && npm run --prefix test/e2e/harness/ test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaning towards thinking we should prepend npm run lint
to this command. That way we can start enforcing the eslint
style.
util/write-package-info.js
Outdated
name: packageJson.name, | ||
version: packageJson.version | ||
}; | ||
const output = 'export default ' + JSON.stringify(packageInfo, null, 2) + ';' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: There is no ;
in our okta-vue/src/*.js
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This util script is at the root, so not part of lerna. I can put together a PR to add eslint to the root, but we'd have to do testing to make sure it doesn't break what we just fixed for windows.
util/write-package-info.js
Outdated
|
||
const workingDirectory = process.argv[2]; | ||
const destinationFile = process.argv[3]; | ||
const packageJsonPath = path.join(process.cwd(), workingDirectory, 'package.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
packages/okta-vue/package.json
Outdated
"start": "npm run --prefix test/e2e/harness/ start", | ||
"build": "rimraf dist/ && cross-env NODE_ENV=production webpack --config webpack.config.js --output-library-target=umd -p", | ||
"build:harness": "npm --prefix test/e2e/harness install", | ||
"build:package-info": "node ../../util/write-package-info.js . src/packageInfo.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider using lerna run
to handle this for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This task needs to be integrated into the build pipeline of each package, and ran locally while working on that specific package, so I'm not sure how lerna would help here?
- Add lniter to test in vue - Fix issues in new util script
name: packageJson.name, | ||
version: packageJson.version | ||
}; | ||
const output = 'export default ' + JSON.stringify(packageInfo, null, 2) + ';'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted earlier, the trailing + ';'
will result in eslint issues in our Vue package. Can we make this conditional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I excluded this file using the eslintignore in the vue package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses the new property in AuthJS to append the framework lib to the user agent Also adds unit testing via Jest for React, Vue Angular not yet tested, will add a "unit" test to app.component.spec.ts after #143 lands in master Add lniter to test in vue
Uses the new property in AuthJS to append the framework lib to the user agent Also adds unit testing via Jest for React, Vue Angular not yet tested, will add a "unit" test to app.component.spec.ts after #143 lands in master Add lniter to test in vue
Uses the new property in AuthJS to append the framework lib to the user agent Also adds unit testing via Jest for React, Vue Angular not yet tested, will add a "unit" test to app.component.spec.ts after #143 lands in master Add lniter to test in vue
Uses the new property in AuthJS to append the framework lib to the user agent
Also adds unit testing via Jest for React, Vue
Angular not yet tested, will add a "unit" test to app.component.spec.ts after #143 lands in master