@nx/expo 22.7.0-pr.35019.f500fd7 → 22.7.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "22.7.0-pr.35019.f500fd7",
3
+ "version": "22.7.0-rc.0",
4
4
  "private": false,
5
5
  "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
6
6
  "keywords": [
@@ -26,12 +26,13 @@
26
26
  "license": "MIT",
27
27
  "author": "Victor Savkin",
28
28
  "main": "./index.js",
29
+ "type": "commonjs",
29
30
  "types": "index.d.ts",
30
31
  "dependencies": {
31
- "@nx/devkit": "22.7.0-pr.35019.f500fd7",
32
- "@nx/eslint": "22.7.0-pr.35019.f500fd7",
33
- "@nx/js": "22.7.0-pr.35019.f500fd7",
34
- "@nx/react": "22.7.0-pr.35019.f500fd7",
32
+ "@nx/devkit": "22.7.0-rc.0",
33
+ "@nx/eslint": "22.7.0-rc.0",
34
+ "@nx/js": "22.7.0-rc.0",
35
+ "@nx/react": "22.7.0-rc.0",
35
36
  "enhanced-resolve": "^5.8.3",
36
37
  "picocolors": "^1.1.0",
37
38
  "semver": "^7.6.3",
@@ -43,11 +44,11 @@
43
44
  "metro-resolver": ">= 0.82.0"
44
45
  },
45
46
  "devDependencies": {
46
- "nx": "22.7.0-pr.35019.f500fd7"
47
+ "nx": "22.7.0-rc.0"
47
48
  },
48
49
  "optionalDependencies": {
49
- "@nx/detox": "22.7.0-pr.35019.f500fd7",
50
- "@nx/rollup": "22.7.0-pr.35019.f500fd7"
50
+ "@nx/detox": "22.7.0-rc.0",
51
+ "@nx/rollup": "22.7.0-rc.0"
51
52
  },
52
53
  "executors": "./executors.json",
53
54
  "ng-update": {
@@ -57,6 +58,5 @@
57
58
  "generators": "./generators.json",
58
59
  "publishConfig": {
59
60
  "access": "public"
60
- },
61
- "type": "commonjs"
61
+ }
62
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"metro-resolver.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/metro-resolver.ts"],"names":[],"mappings":"AAiCA,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAAE,EACpB,qBAAqB,GAAE,MAAM,EAAO,EACpC,UAAU,GAAE,MAAM,EAAO,IAGvB,UAAU,GAAG,EACb,gBAAgB,MAAM,EACtB,UAAU,MAAM,GAAG,IAAI,SAwC1B"}
1
+ {"version":3,"file":"metro-resolver.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/metro-resolver.ts"],"names":[],"mappings":"AAkCA,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAAE,EACpB,qBAAqB,GAAE,MAAM,EAAO,EACpC,UAAU,GAAE,MAAM,EAAO,IAGvB,UAAU,GAAG,EACb,gBAAgB,MAAM,EACtB,UAAU,MAAM,GAAG,IAAI,SAwC1B"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getResolveRequest = getResolveRequest;
4
4
  const tslib_1 = require("tslib");
5
5
  const tsconfig_paths_1 = require("tsconfig-paths");
6
+ const ts_config_1 = require("@nx/js/src/utils/typescript/ts-config");
6
7
  const pc = tslib_1.__importStar(require("picocolors"));
7
8
  const enhanced_resolve_1 = require("enhanced-resolve");
8
9
  const path_1 = require("path");
@@ -119,7 +120,7 @@ function getMatcher(debug) {
119
120
  if (!matcher) {
120
121
  const result = (0, tsconfig_paths_1.loadConfig)();
121
122
  if (result.resultType === 'success') {
122
- absoluteBaseUrl = result.absoluteBaseUrl;
123
+ absoluteBaseUrl = (0, ts_config_1.resolvePathsBaseUrl)(result.configFileAbsolutePath);
123
124
  paths = result.paths;
124
125
  if (debug) {
125
126
  console.log(pc.cyan(`[Nx] Located tsconfig at ${pc.bold(absoluteBaseUrl)}`));
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAOd,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAuBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAmBxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAOd,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAsBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAsBxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
package/plugins/plugin.js CHANGED
@@ -11,7 +11,6 @@ const cache_directory_1 = require("nx/src/utils/cache-directory");
11
11
  const devkit_internals_1 = require("nx/src/devkit-internals");
12
12
  const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
13
13
  const util_1 = require("@nx/js/src/plugins/typescript/util");
14
- const pmc = (0, devkit_1.getPackageManagerCommand)();
15
14
  function readTargetsCache(cachePath) {
16
15
  return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
17
16
  }
@@ -28,8 +27,9 @@ exports.createNodes = [
28
27
  const optionsHash = (0, devkit_internals_1.hashObject)(options);
29
28
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `expo-${optionsHash}.hash`);
30
29
  const targetsCache = readTargetsCache(cachePath);
30
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
31
31
  try {
32
- return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache), configFiles, options, context);
32
+ return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, pmc), configFiles, options, context);
33
33
  }
34
34
  finally {
35
35
  writeTargetsToCache(cachePath, targetsCache);
@@ -37,7 +37,7 @@ exports.createNodes = [
37
37
  },
38
38
  ];
39
39
  exports.createNodesV2 = exports.createNodes;
40
- async function createNodesInternal(configFile, options, context, targetsCache) {
40
+ async function createNodesInternal(configFile, options, context, targetsCache, pmc) {
41
41
  options = normalizeOptions(options);
42
42
  const projectRoot = (0, path_1.dirname)(configFile);
43
43
  // Do not create a project if package.json or project.json or metro.config.js isn't there.
@@ -55,7 +55,7 @@ async function createNodesInternal(configFile, options, context, targetsCache) {
55
55
  return {};
56
56
  }
57
57
  const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
58
- targetsCache[hash] ??= buildExpoTargets(projectRoot, options, context);
58
+ targetsCache[hash] ??= buildExpoTargets(projectRoot, options, context, pmc);
59
59
  return {
60
60
  projects: {
61
61
  [projectRoot]: {
@@ -64,7 +64,7 @@ async function createNodesInternal(configFile, options, context, targetsCache) {
64
64
  },
65
65
  };
66
66
  }
67
- function buildExpoTargets(projectRoot, options, context) {
67
+ function buildExpoTargets(projectRoot, options, context, pmc) {
68
68
  const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
69
69
  const targets = {
70
70
  [options.startTargetName]: {
@@ -1 +1 @@
1
- {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/expo/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AACtE,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAYpB,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BA0FrE"}
1
+ {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/expo/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AACtE,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAYpB,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BA4FrE"}
package/.eslintrc.json DELETED
@@ -1,64 +0,0 @@
1
- {
2
- "extends": "../../.eslintrc.json",
3
- "rules": {},
4
- "ignorePatterns": ["!**/*", "node_modules"],
5
- "overrides": [
6
- {
7
- "files": [
8
- "./package.json",
9
- "./generators.json",
10
- "./executors.json",
11
- "./migrations.json"
12
- ],
13
- "parser": "jsonc-eslint-parser",
14
- "rules": {
15
- "@nx/nx-plugin-checks": "error"
16
- }
17
- },
18
- {
19
- "files": ["./package.json"],
20
- "parser": "jsonc-eslint-parser",
21
- "rules": {
22
- "@nx/dependency-checks": [
23
- "error",
24
- {
25
- "buildTargets": ["build-base"],
26
- "ignoredDependencies": [
27
- "nx",
28
- "@nx/jest",
29
- "@nx/rollup",
30
- "@nx/web",
31
- "@nx/webpack",
32
- "@nx/cypress",
33
- "@nx/playwright",
34
- "@nx/detox",
35
- "typescript",
36
- "eslint",
37
- "expo",
38
- "react",
39
- "@expo/cli",
40
- "eas-cli",
41
- "util" // This is coming from @storybook/builder-manager since it uses the browser polyfill
42
- ]
43
- }
44
- ]
45
- }
46
- },
47
- {
48
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
49
- "rules": {
50
- "no-restricted-imports": [
51
- "error",
52
- {
53
- "name": "chalk",
54
- "message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
55
- },
56
- {
57
- "name": "fs-extra",
58
- "message": "Please use equivalent utilities from `node:fs` instead."
59
- }
60
- ]
61
- }
62
- }
63
- ]
64
- }
package/jest.config.cts DELETED
@@ -1,7 +0,0 @@
1
- /* eslint-disable */
2
- module.exports = {
3
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'],
4
- globals: {},
5
- displayName: 'expo',
6
- preset: '../../jest.preset.js',
7
- };
package/project.json DELETED
@@ -1,54 +0,0 @@
1
- {
2
- "name": "expo",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/expo/src",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "outputs": ["{workspaceRoot}/dist/packages/expo/README.md"],
9
- "command": "node ./scripts/copy-readme.js expo"
10
- },
11
- "legacy-post-build": {
12
- "executor": "@nx/workspace-plugin:legacy-post-build",
13
- "options": {
14
- "tsConfig": "./tsconfig.lib.json",
15
- "assets": [
16
- "packages/expo/*.md",
17
- {
18
- "input": "packages/expo",
19
- "glob": "**/!(*.ts)",
20
- "output": "/"
21
- },
22
- {
23
- "input": "packages/expo",
24
- "glob": "**/*.d.ts",
25
- "output": "/"
26
- },
27
- {
28
- "input": "packages/expo",
29
- "glob": "**/files/**",
30
- "output": "/"
31
- },
32
- {
33
- "input": "packages/expo",
34
- "glob": "**/files/**/.gitkeep",
35
- "output": "/"
36
- },
37
- {
38
- "input": "packages/expo",
39
- "glob": "**/files/**/.babelrc.js.template",
40
- "output": "/"
41
- },
42
- {
43
- "input": "packages/expo",
44
- "glob": "**/*.json",
45
- "ignore": ["**/tsconfig*.json", "**/project.json"],
46
- "output": "/"
47
- },
48
- "LICENSE"
49
- ]
50
- }
51
- }
52
- },
53
- "tags": []
54
- }