Update prettier and reformat source code

This commit is contained in:
Nicolas Gallagher
2022-07-03 17:37:19 -07:00
parent c8f6db8bfc
commit 174b8f505a
162 changed files with 2950 additions and 1370 deletions
@@ -11,7 +11,10 @@ const getDirectories = (source) =>
const packagesDir = path.join(__dirname, '../packages/');
const exportsDir = path.join(packagesDir, 'react-native-web/src/exports');
const moduleMapOutfile = path.join(packagesDir, 'babel-plugin-react-native-web/src/moduleMap.js');
const moduleMapOutfile = path.join(
packagesDir,
'babel-plugin-react-native-web/src/moduleMap.js'
);
const moduleMap = getDirectories(exportsDir).reduce((acc, curr) => {
acc[curr] = true;
+4 -1
View File
@@ -14,5 +14,8 @@ const browserList = {
};
generator(browserList, {
path: path.join(__dirname, '../packages/react-native-web/src/modules/prefixStyles/static.js')
path: path.join(
__dirname,
'../packages/react-native-web/src/modules/prefixStyles/static.js'
)
});
+20 -12
View File
@@ -18,21 +18,26 @@ const oneTimeCode = argv.otp;
console.log(`Publishing react-native-web@${version}`);
// Collect 'react-native-web' workspaces and package manifests
const workspacePaths = require('../package.json').workspaces.reduce((acc, w) => {
const resolvedPaths = glob.sync(w);
resolvedPaths.forEach((p) => {
// Remove duplicates and unrelated packages
if (p.includes('react-native-web') && acc.indexOf(p) === -1) {
acc.push(p);
}
});
return acc;
}, []);
const workspacePaths = require('../package.json').workspaces.reduce(
(acc, w) => {
const resolvedPaths = glob.sync(w);
resolvedPaths.forEach((p) => {
// Remove duplicates and unrelated packages
if (p.includes('react-native-web') && acc.indexOf(p) === -1) {
acc.push(p);
}
});
return acc;
},
[]
);
const workspaces = workspacePaths.map((dir) => {
const directory = path.resolve(dir);
const packageJsonPath = path.join(directory, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
const packageJson = JSON.parse(
fs.readFileSync(packageJsonPath, { encoding: 'utf-8' })
);
return { directory, packageJson, packageJsonPath };
});
@@ -48,7 +53,10 @@ workspaces.forEach(({ directory, packageJson, packageJsonPath }) => {
packageJson.devDependencies[name] = version;
}
});
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
fs.writeFileSync(
packageJsonPath,
JSON.stringify(packageJson, null, 2) + '\n'
);
});
// Commit changes