-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(scripts): enable strict checking for additional sub-folders(packages) #24526
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
Changes from all commits
cd4190d
03c9e42
fd73262
0199d86
a8539b2
c790543
46afd1c
d41ef13
159429d
04d7cca
6a1901f
d915394
0a9ea2e
a1b6fc9
4463edb
9eeb84c
a3f0054
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "fix(eslint-plugin): properly resolve single-version policy dep issues in react-northstar packages", | ||
| "packageName": "@fluentui/eslint-plugin", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "none" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| const { findGitRoot } = require('../utils/configHelpers'); | ||
|
|
||
| const workspaceRoot = findGitRoot(); | ||
|
|
||
| module.exports = { | ||
| extends: [ | ||
| 'airbnb', | ||
|
|
@@ -23,7 +27,10 @@ module.exports = { | |
| 'import/no-default-export': 'error', | ||
| 'import/no-extraneous-dependencies': [ | ||
| 'error', | ||
| { devDependencies: ['**/*-test.ts*', '**/*.test.ts*', '*.config.js', 'gulpfile.ts', 'just.config.ts'] }, | ||
| { | ||
| packageDir: ['.', workspaceRoot], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. enablement for single version policy for devDeps |
||
| devDependencies: ['**/*-test.ts*', '**/*.test.ts*', '*.config.js', 'gulpfile.ts', 'just.config.ts'], | ||
| }, | ||
| ], | ||
|
|
||
| // False positive on arg types: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,8 +7,7 @@ | |
| "@fluentui/react-northstar": "^0.64.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@fluentui/scripts": "^1.0.0", | ||
| "gulp": "^4.0.2" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved to root package.json (single version policy) |
||
| "@fluentui/scripts": "^1.0.0" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../tsconfig.scripts.json", | ||
| "compilerOptions": { | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,9 +3,9 @@ import * as path from 'path'; | |
| import * as fs from 'fs'; | ||
| import { argv } from 'yargs'; | ||
|
|
||
| import { findGitRoot } from '../monorepo/index'; | ||
| import { findGitRoot, PackageJson } from '../monorepo'; | ||
|
|
||
| export function fluentuiLernaPublish(bumpType, skipConfirm = false, npmTagForCanary = 'beta') { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to have this as public API when its not used |
||
| function fluentuiLernaPublish(bumpType: 'patch' | 'minor' | 'canary', skipConfirm = false, npmTagForCanary = 'beta') { | ||
| const gitRoot = findGitRoot(); | ||
| const fluentRoot = path.resolve(gitRoot, 'packages', 'fluentui'); | ||
|
|
||
|
|
@@ -91,7 +91,7 @@ const execCommandSync = (cwd: string, command: string, args: string[]) => { | |
| return result.stdout; | ||
| }; | ||
|
|
||
| export function fluentuiPostPublishValidation() { | ||
| function fluentuiPostPublishValidation() { | ||
| const gitRoot = findGitRoot(); | ||
|
|
||
| const branch = execCommandSync(gitRoot, 'git', ['branch', '--show-current']); | ||
|
|
@@ -112,19 +112,19 @@ export function fluentuiPostPublishValidation() { | |
| } | ||
|
|
||
| // pack all public fluent ui packages, used by ci to store nightly built artifacts | ||
| export function packFluentTarballs() { | ||
| function packFluentTarballs() { | ||
| const gitRoot = findGitRoot(); | ||
| const fluentRoot = path.resolve(findGitRoot(), 'packages', 'fluentui'); | ||
|
|
||
| const TODAY = new Date().toISOString().split('T')[0]; // yyyy-mm-dd | ||
|
|
||
| const fluentPackages = JSON.parse( | ||
| const fluentPackages: Array<{ name: string; private?: boolean; location: string }> = JSON.parse( | ||
| execCommandSync(fluentRoot, '../../node_modules/.bin/lerna', ['ls', '--json']).toString(), | ||
| ); | ||
| const fluentPackagesNames = fluentPackages.map(pkg => pkg.name); | ||
|
|
||
| const replaceDepVersionWithNightlyUrl = packageLocation => { | ||
| const packageJson = require(`${packageLocation}/package.json`); | ||
| const replaceDepVersionWithNightlyUrl = (packageLocation: string) => { | ||
| const packageJson: PackageJson = require(`${packageLocation}/package.json`); | ||
| packageJson.version = `0.0.0-nightly+${TODAY}`; | ||
| const dependencies = packageJson.dependencies || {}; | ||
|
|
||
|
|
@@ -161,6 +161,9 @@ export function packFluentTarballs() { | |
| execCommandSync(gitRoot, 'git', ['checkout', '-f']); | ||
| } | ||
|
|
||
| /** | ||
| * publish CLI for @fluentui/react-northstar | ||
| */ | ||
| function run() { | ||
| const task = argv._[0]; | ||
| const skipConfirm = !!argv['yes']; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../tsconfig.scripts.json", | ||
| "compilerOptions": { | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../tsconfig.scripts.json", | ||
| "compilerOptions": { | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["**/*.ts"] | ||
| } |
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.
moved from
/scripts