Skip to content

Commit c19c6e4

Browse files
refactor: update Tempy to resolve deprecation warning (#226)
1 parent fa7378c commit c19c6e4

27 files changed

+505
-127
lines changed

package-lock.json

Lines changed: 436 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/configure/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"description": "Trapeze configuration tool for automatically configuring projects",
55
"author": "Ionic Team <[email protected]> (https://ionicframework.com) ",
66
"license": "SEE LICENSE",
7-
"private": false,
87
"files": [
98
"bin",
109
"dist",
@@ -22,12 +21,12 @@
2221
"main": "dist/index.js",
2322
"typings": "dist/index.d.ts",
2423
"dependencies": {
25-
"@trapezedev/project": "7.1.3",
2624
"@ionic/cli-framework-output": "^2.2.2",
2725
"@ionic/utils-fs": "^3.1.5",
2826
"@ionic/utils-subprocess": "^2.1.8",
2927
"@ionic/utils-terminal": "^2.3.1",
3028
"@prettier/plugin-xml": "^1.1.0",
29+
"@trapezedev/project": "7.1.3",
3130
"@types/fs-extra": "^9.0.13",
3231
"@types/jest": "^27.0.2",
3332
"@types/lodash": "^4.14.175",
@@ -66,8 +65,8 @@
6665
},
6766
"devDependencies": {
6867
"jest": "^27.2.5",
69-
"rimraf": "^3.0.2",
70-
"tempy": "^1.0.1",
68+
"rimraf": "^6.0.1",
69+
"tempy": "^3.1.0",
7170
"ts-jest": "^27.0.7",
7271
"typescript": "^4.4.4"
7372
},

packages/configure/test/ops/android.appName.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { copy, readFile, rm } from '@ionic/utils-fs';
22
import { XmlFile } from '@trapezedev/project';
33
import { join } from 'path';
4-
import tempy from 'tempy';
4+
import { temporaryDirectory } from 'tempy';
55

66
import { Context, loadContext } from '../../src/ctx';
77
import { AndroidAppNameOperation, Operation } from '../../src/definitions';
@@ -14,7 +14,7 @@ describe('op: android.appName', () => {
1414
let ctx: Context;
1515

1616
beforeEach(async () => {
17-
dir = tempy.directory();
17+
dir = temporaryDirectory();
1818

1919
await copy('../common/test/fixtures/ios-and-android', dir);
2020

@@ -45,4 +45,4 @@ describe('op: android.appName', () => {
4545
</resources>
4646
`.trim());
4747
});
48-
});
48+
});

packages/configure/test/ops/android.copy.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copy, readFile, rm } from '@ionic/utils-fs';
22
import { join } from 'path';
3-
import tempy from 'tempy';
3+
import { temporaryDirectory } from 'tempy';
44

55
import { Context, loadContext } from '../../src/ctx';
66
import { AndroidCopyOperation, Operation } from '../../src/definitions';
@@ -13,7 +13,7 @@ describe('op: android.copy', () => {
1313
let ctx: Context;
1414

1515
beforeEach(async () => {
16-
dir = tempy.directory();
16+
dir = temporaryDirectory();
1717

1818
await copy('../common/test/fixtures/ios-and-android', dir);
1919

@@ -43,4 +43,4 @@ describe('op: android.copy', () => {
4343
const destContents = await readFile(dest);
4444
expect(srcContents).toEqual(destContents);
4545
});
46-
});
46+
});

packages/configure/test/ops/android.gradle.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { copy } from '@ionic/utils-fs';
22
import { AndroidGradleInjectType } from '@trapezedev/project';
33
import { GradleFile } from '@trapezedev/project/dist/android/gradle-file';
44
import { join } from 'path';
5-
import tempy from 'tempy';
5+
import { temporaryDirectory } from 'tempy';
66

77
import { Context, loadContext } from '../../src/ctx';
88
import { AndroidGradleOperation, Operation } from '../../src/definitions';
@@ -23,7 +23,7 @@ describe('op: android.gradle', () => {
2323
let ctx: Context;
2424

2525
beforeEach(async () => {
26-
dir = tempy.directory();
26+
dir = temporaryDirectory();
2727

2828
await copy('../common/test/fixtures/ios-and-android', dir);
2929

@@ -249,4 +249,4 @@ task clean(type: Delete) {
249249
`.trim()
250250
);
251251
});
252-
});
252+
});

packages/configure/test/ops/android.json.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { copy } from '@ionic/utils-fs';
22
import { JsonFile } from '@trapezedev/project';
33
import { join } from 'path';
4-
import tempy from 'tempy';
4+
import { temporaryDirectory } from 'tempy';
55

66
import { Context, loadContext } from '../../src/ctx';
77
import { AndroidJsonOperation, Operation } from '../../src/definitions';
@@ -12,7 +12,7 @@ describe('op: android.json', () => {
1212
let ctx: Context;
1313

1414
beforeEach(async () => {
15-
dir = tempy.directory();
15+
dir = temporaryDirectory();
1616

1717
await copy('../common/test/fixtures/ios-and-android', dir);
1818

packages/configure/test/ops/android.manifest.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copy, readFile } from '@ionic/utils-fs';
22
import { join } from 'path';
3-
import tempy from 'tempy';
3+
import { temporaryDirectory } from 'tempy';
44

55
import { Context, loadContext } from '../../src/ctx';
66
import { AndroidXmlOperation, Operation } from '../../src/definitions';
@@ -12,7 +12,7 @@ describe('op: android.manifest', () => {
1212
let ctx: Context;
1313

1414
beforeEach(async () => {
15-
dir = tempy.directory();
15+
dir = temporaryDirectory();
1616

1717
await copy('../common/test/fixtures/ios-and-android', dir);
1818

packages/configure/test/ops/android.properties.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copy } from '@ionic/utils-fs';
22
import { join } from 'path';
3-
import tempy from 'tempy';
3+
import { temporaryDirectory } from 'tempy';
44

55
import { Context, loadContext } from '../../src/ctx';
66
import { AndroidJsonOperation, AndroidPropertiesOperation, Operation } from '../../src/definitions';
@@ -11,7 +11,7 @@ describe('op: android.properties', () => {
1111
let ctx: Context;
1212

1313
beforeEach(async () => {
14-
dir = tempy.directory();
14+
dir = temporaryDirectory();
1515

1616
await copy('../common/test/fixtures/ios-and-android', dir);
1717

packages/configure/test/ops/android.versionCode.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copy } from '@ionic/utils-fs';
22
import { join } from 'path';
3-
import tempy from 'tempy';
3+
import { temporaryDirectory } from 'tempy';
44

55
import { Context, loadContext } from '../../src/ctx';
66
import { Operation } from '../../src/definitions';
@@ -12,7 +12,7 @@ describe('op: android.versionCode', () => {
1212
let ctx: Context;
1313

1414
beforeEach(async () => {
15-
dir = tempy.directory();
15+
dir = temporaryDirectory();
1616

1717
await copy('../common/test/fixtures/ios-and-android', dir);
1818

packages/configure/test/ops/android.xml.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copy, readFile } from '@ionic/utils-fs';
22
import { join } from 'path';
3-
import tempy from 'tempy';
3+
import { temporaryDirectory } from 'tempy';
44

55
import { Context, loadContext } from '../../src/ctx';
66
import { AndroidXmlOperation, Operation } from '../../src/definitions';
@@ -12,7 +12,7 @@ describe('op: android.xml', () => {
1212
let ctx: Context;
1313

1414
beforeEach(async () => {
15-
dir = tempy.directory();
15+
dir = temporaryDirectory();
1616

1717
await copy('../common/test/fixtures/ios-and-android', dir);
1818

0 commit comments

Comments
 (0)