Socket
Socket
Sign inDemoInstall

@expo/config-plugins

Package Overview
Dependencies
Maintainers
26
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config-plugins - npm Package Compare versions

Comparing version 8.0.3 to 8.0.4

5

build/android/Package.d.ts

@@ -19,1 +19,6 @@ import { ExpoConfig } from '@expo/config-types';

export declare function getApplicationIdAsync(projectRoot: string): Promise<string | null>;
/**
* Make a package name safe to use in a kotlin file,
* e.g. is.pvin.hello -> `is`.pvin.hello
*/
export declare function kotlinSanitized(packageName: string): string;

20

build/android/Package.js

@@ -8,2 +8,3 @@ "use strict";

exports.getPackage = getPackage;
exports.kotlinSanitized = kotlinSanitized;
exports.renameJniOnDiskForType = renameJniOnDiskForType;

@@ -243,2 +244,3 @@ exports.renamePackageOnDisk = renamePackageOnDisk;

}
const kotlinSanitizedPackageName = kotlinSanitized(packageName);
// Replace all occurrences of the path in the project

@@ -249,3 +251,7 @@ filesToUpdate.forEach(filepath => {

let contents = _fs().default.readFileSync(filepath).toString();
contents = replacePackageName(contents, currentPackageName, packageName);
if (_path().default.extname(filepath) === '.kt') {
contents = replacePackageName(contents, currentPackageName, kotlinSanitizedPackageName);
} else {
contents = replacePackageName(contents, currentPackageName, packageName);
}
if (['.h', '.cpp'].includes(_path().default.extname(filepath))) {

@@ -308,2 +314,14 @@ contents = contents.replace(new RegExp(transformJavaClassDescriptor(currentPackageName).replace(/\//g, '\\'), 'g'), transformJavaClassDescriptor(packageName));

}
/**
* Make a package name safe to use in a kotlin file,
* e.g. is.pvin.hello -> `is`.pvin.hello
*/
function kotlinSanitized(packageName) {
const stringsToWrap = ['is', 'in', 'as', 'fun'];
const parts = packageName.split('.');
const cleanParts = parts.map(part => stringsToWrap.includes(part) ? '`' + part + '`' : part);
const cleanName = cleanParts.join('.');
return cleanName;
}
//# sourceMappingURL=Package.js.map

4

package.json
{
"name": "@expo/config-plugins",
"version": "8.0.3",
"version": "8.0.4",
"description": "A library for Expo config plugins",

@@ -61,3 +61,3 @@ "main": "build/index.js",

},
"gitHead": "f47e3af17a790a34b95fe10dda8383389e7d74e2"
"gitHead": "470464ab5c25ae8bd45eb2a94d221ce51a8b2560"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc